[xsde-users] Multiple restrictions

Pavel Fiala pavel.fiala at cern.ch
Thu Dec 5 03:21:07 EST 2013


Hi Boris,

thank you for confirmation. These values are used from different C++ 
project so I wanted to keep the structure similar as long as possible.

I change the myArrayType1_base

   <xs:complexType name="myArrayType1_base" abstract="true">
     <xs:complexContent>
       <xs:restriction base="my:type">
         <xs:attribute name="id" type="xs:unsignedInt" use="required"/>
         <xs:attribute name="dataType" type="my:basicDataType" 
fixed="64" use="required"/>
       </xs:restriction>
     </xs:complexContent>
   </xs:complexType>

Now, it compiles without any error but the fixed value is ignored. The 
only restriction is the one from basicDataType. I guess it's the same 
limitation, isn't it?

The reasons why I wanted to try XSDe first are probably lower memory 
usage and build-in serializer. Also, I have to process large files 
(Xerces DOM takes ~1.7GB of memory) so I would probably go for XSD's 
C++/parser. Is there tha same limitation in the C++/parser? Otherwise I 
will have a look at the C++/tree streaming and performance examples.

Pavel

On 5.12.2013 07:52, Boris Kolpackov wrote:
> Hi Pavel,
>
> Pavel Fiala <pavel.fiala at cern.ch> writes:
>
>> Should I change the command somehow to make it compilable or is it a
>> bug/limitation in XSDe?
> Yes, this is a limitation in XSD/e support for complex inheritance-by-
> restriction cases. See this earlier reply to a similar problem for
> details:
>
> http://www.codesynthesis.com/pipermail/xsde-users/2011-July/000405.html
>
> In your case the workaround would be to change the type of dataType
> in myArrayType1_base from arrayDataType to basicDataType.
>
> Also, if you have a large number of such case then you may want to
> consider using XSD's C++/Tree mapping instead. It has much better
> support for complex schemas.
>
> Boris



More information about the xsde-users mailing list