Menu

xs:anyType element in EXI with external schema

Anonymous
2013-03-27
2013-04-05
  • Anonymous

    Anonymous - 2013-03-27

    Hi,

    I am trying to encode EXi stream with 2 schemas. The main schema has following definition to the second schema in its body:

    <xs:complexType>
        <xs:complexContent>
            <xs:extension base="xs:anyType"/>
        </xs:complexContent>
    </xs:complexType>
    

    But the generateSchemaInformedGrammars function always returns UNEXPECTED_ERROR.
    I have tried many ways, how to define reference to other external schema but no luck. How schould I define it? (Does the library even support this feature?)

    Thanks and Regards
    Filip

     
  • Rumen Kyusakov

    Rumen Kyusakov - 2013-04-02

    Hi Filip,

    I am not sure I understand the problem here. Have a look at the exipe example that uses 3 schemas when in schema mode. The schemas are connected with <import> statement.

    Remember you need to pass the list with the paths to all three schemas to exipe:
    -schema=examples/simpleEncoding/exipe-test-xsd.exi,examples/simpleEncoding/exipe-test-nested-xsd.exi,examples/simpleEncoding/exipe-test-types-xsd.exi examples/simpleEncoding/exipe-test.exi

    // Rumen

     
  • Anonymous

    Anonymous - 2013-04-03

    Hi Rumen,

    Thank you for reply. The thing is that the first schema does not know second schema. Definition of such case is done by \<xs:extension base="xs:anyType"/> according to specification. That is why I am trying to avoid \<import> clause. Following is the example what I am trying to achieve (ignore the \ at the beginning of lines, tags was not visible while in preview mode withouth it):

    first schema:
    \<xs:element name="element1">
    \<xs:complexType>
    \<xs:complexContent>
    \<xs:extension base="xs:anyType"/>
    \</xs:complexContent>
    \</xs:complexType>
    \</xs:element>

    second schema:
    \<xs:element name="number" type="xs:unsignedInt"/>
    \<xs:element name="string" type="xs:string"/>

    XML data:
    \<element1>
    \<number>10\</number>
    \<string>text\</string>
    \</element1>

    Thanks,
    Filip

     
  • Rumen Kyusakov

    Rumen Kyusakov - 2013-04-05

    Hi Filip,

    I think I understand now - you would like to use 2 schemas that are unrelated (not connected through <import>) but use them to encode one EXI stream.

    I don't have an answer to that question and I am also interested to know if this is allowed by the EXI spec. It is not very clear from the definitions there so I raised the question within the EXI working group.

    When I get to know more I'll let you know.

    Best,
    Rumen

     
  • Anonymous

    Anonymous - 2013-04-05

    Hi Rumen,

    I found this definition at http://tools.ietf.org/html/rfc4741 (search for "anyType"). Meanwhile I also found a way how to encode it successfully, I used this:

    \<xs:element name="test" type="xs:anyType"/>

    however I don't know if it is the same as above.

    Filip

     

Anonymous
Anonymous

Add attachments
Cancel