This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Microsoft XML > May 2004 > XML Schema validation: redefine with intermixed annotations





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author XML Schema validation: redefine with intermixed annotations
Thomas G. Habing

2004-05-20, 7:34 pm

Hi all,

Using MSXML 4.0, I am running into a schema validation problem when using
the redefine with multiple intermixed annotation elements. For example:

<redefine schemaLocation="...">

<annotation>...</annotation>

<complexType>...</complexType>

<annotation>...</annotation>

<complexType>...</complexType>

<annotation>...</annotation>

<complexType>...</complexType>

</redefine>

I have narrowed this down to a problem with the annotations, because if I
remove all of the annotations except for the first one, everything works as
expected, such as:

<redefine schemaLocation="...">

<annotation>...</annotation>

<complexType>...</complexType>

<complexType>...</complexType>

<complexType>...</complexType>

</redefine>

The content model for redefine in the XML Schema spec:

Content: (annotation | (simpleType | complexType | group | attributeGroup))*

seems to indicate that you can have as many annotations scattered around as
you like, and this does work with other validators, such as XSV, but MSXML
seems to have problems with it.

I would just change the schema; however, its not mine, but I still need to
validate my instance documents against it.

Any advice on overcoming this problem is appreciated.

Thanks,
Tom
--
Thomas Habing
Research Programmer, Digital Library Projects
University of Illinois at Urbana-Champaign
155 Grainger Engineering Library Information Center, MC-274
thabing@uiuc.edu, (217) 244-4425
http://dli.grainger.uiuc.edu
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews