[xsde-users] Need to set two delimiters, one before and one after
some lists
Rangarajan, Ravi_Sowmian
raviraja at qti.qualcomm.com
Mon May 16 19:36:39 EDT 2016
Hi Boris,
I double checked if any other API with same prefix delimiter existed in generated code - it is not there. There is only one delimiter. Actually, this is not the first time I am encountering this, I have seen this with few other schemas as well. I am not sure if there is any compiler switch/flag that needs to be enabled to get it to generate delimiter1() in addition to delimiter().
I have enclosed a zip with the schema I work with (FDT_r12.xsd), along with its dependencies, just in case you want to look at complete schema to be able to help. Pls. let me know if you think I may be missing any compile-time flag that is preventing generation of second delimiter with name such as delimiter1().
I will go through the manual/guide on how to the custom mapping.
Thank you again
Ravi
-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Sunday, May 15, 2016 4:30 PM
To: Rangarajan, Ravi_Sowmian <raviraja at qti.qualcomm.com>
Cc: xsde-users at codesynthesis.com
Subject: Re: [xsde-users] Need to set two delimiters, one before and one after some lists
Hi Ravi,
Rangarajan, Ravi_Sowmian <raviraja at qti.qualcomm.com> writes:
> <xs:sequence>
> <xs:element ref="mbms2007:Cache-Control" minOccurs="0"/>
> <xs:element ref="sv:delimiter"/>
> <xs:element ref="mbms2012:Alternate-Content-Location-1" minOccurs="0" maxOccurs="unbounded"/>
> <xs:element ref="mbms2012:Alternate-Content-Location-2" minOccurs="0" maxOccurs="unbounded"/>
> <xs:element ref="sv:delimiter"/>
> [...]
> </xs:sequence>
>
> Q1. How to insert second delimiter via code synthesis tool?
Look at the generated API for the class, it will have the delimiter1() modifiers for the second element.
> Q2. Is there a way to determine when the code synthesis tool will
> generate with tag p1 or p2 or p3 in a predictable fashion? Or is it
> arbitrarily using any of these keywords?
>
> <p1:delimiter>0</p1:delimiter>
> <p2:delimiter>0</p2:delimiter>
Yes, you can establish custom mapping for their namespace. See Chapter 8, "Document Serializer and Error Handling" for details:
http://www.codesynthesis.com/projects/xsde/documentation/cxx/serializer/guide/index.xhtml#8
Boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FdtSchemas.zip
Type: application/x-zip-compressed
Size: 3360 bytes
Desc: FdtSchemas.zip
Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20160516/adaea196/FdtSchemas.bin
More information about the xsde-users
mailing list