Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: XML schema for TCI logging

XML schema for TCI logging 26 Sep 2007 11:45 #7256

Hi All



I believe XML logging is widely used in the community but I'm not sure if
people care of validating log traces against schema. It seems that there is
an error in schema, at least validating parser from .Net doesn't accept it.



TCI XML mapping defines TciValueTemplate as an extension of Value (which is
defined as a choice) having the same fields but with different types. As far
as I understand extending choice with another choice produces sequence of
choices which is not the intended specification.



Look at the extraction from the standard below (I removed all variants from
the choice except "integer" to make it more readable)



This code belongs to uri.etsi.org/ttcn-3/tci/Values_v3_2_1.xsd
namespace

<xsd:complexType name="Value" mixed="true">

<xsd:choice>

<xsd:element name="integer" type="Values:IntegerValue"/>

<!-THERE ARE MORE ELEMENTS -->

</xsd:choice>

<xsd:attributeGroup ref="Values:ValueAtts"/>

</xsd:complexType>





And this one belongs to uri.etsi.org/ttcn-3/tci/Templates_v3_2_1.xsd
namespace

<xsd:complexType name="TciValueTemplate">

<xsd:complexContent mixed="true">

<xsd:extension base="Values:Value">

<xsd:choice>

<xsd:element name="integer"
type="Templates:IntegerTemplate"/>

<!-THERE ARE MORE ELEMENTS -->

</xsd:choice>

</xsd:extension>

</xsd:complexContent>

</xsd:complexType>



I think the intended valid document should look like (in case if we have
'integer' template)

<Events:msgTmpl>

<Templates:integer type="integer" name="a">

<Templates:value>2</Templates:value>

</Templates:integer>

</Events:msgTmpl>



But according to schema extension rules valid instance of TciValueTemplate
must contain both "Values:integer" and "Templates:integer" elements and the
valid document is



<Events:msgTmpl>

<Values:integer type="integer" name="a">

<Values:value>2</Values:value>

</Values:integer>

<Templates:integer type="integer" name="a">

<Templates:value>2</Templates:value>

</Templates:integer>

</Events:msgTmpl>



Am I missing something?



Best regards,

Pavel Yakovenko
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin