From ac8f36518f89083428e831cfc237da1a5866b8cc Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 08:40:21 +0200 Subject: [PATCH] Document how to annotate members as key in XML types (#757) * Document how to annotate member as key in XMl types (#746) Signed-off-by: eduponz (cherry picked from commit f95e5c960f5ac57e53b7f2bafb85292f2ba25333) # Conflicts: # code/XMLTester.xml * Refs #21244: Solve conflicts Signed-off-by: Mario Dominguez --------- Signed-off-by: Mario Dominguez Co-authored-by: Eduardo Ponz Segrelles Co-authored-by: Mario Dominguez --- code/XMLTester.xml | 3 +++ docs/fastdds/xml_configuration/dynamic_types.rst | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/code/XMLTester.xml b/code/XMLTester.xml index 31691445a..7d437cecf 100644 --- a/code/XMLTester.xml +++ b/code/XMLTester.xml @@ -1441,6 +1441,9 @@ <--> +XML-MEMBER_WITH_KEY<--> + +<--> XML-BOUNDEDSTRINGS<--> diff --git a/docs/fastdds/xml_configuration/dynamic_types.rst b/docs/fastdds/xml_configuration/dynamic_types.rst index 1bc5cd40c..62a1936af 100644 --- a/docs/fastdds/xml_configuration/dynamic_types.rst +++ b/docs/fastdds/xml_configuration/dynamic_types.rst @@ -161,6 +161,12 @@ Member types Member types are defined as any type that can belong to a ```` or a ````, or be aliased by a ````. These can be defined by the ```` XML tag. +A member can be annotated as ``key`` (equivalent of the IDL's ``@key``) by setting the ``key`` attribute to ``"true"``. + +.. literalinclude:: /../code/XMLTester.xml + :language: xml + :start-after: XML-MEMBER_WITH_KEY<--> + :end-before: <--> Primitive types ***************