Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: [XML Schema 1.1] Using doc() in xs:assert ... the referenced document needs a schema? >Thread Next - [XML Schema 1.1] Is vc:facetAvailable only an attribute of xs:element? (Not an attribute of xs:simpleType?) [XML Schema 1.1] The XPath in cannot "look up" the XML tree, right?To: "'xmlschema-dev@--.---'" <-------------@--.---> Date: 4/29/2009 5:36:00 AM Hi Folks, I wish to confirm that I correctly understand the specification. I believe = it says the XPath in an <assert> cannot "look up" the XML tree. That is, it= can't reference a parent, grandparent, etc. Is that correct? Consider this instance document: <Document classification="secret"> <Para classification="unclassified"> ... </Para> <Para classification="secret"> ... </Para> <Para classification="unclassified"> ... </Para> <Para classification="secret"> ... </Para> </Document> Here I place an <assert> on the Para element which attempts to reference th= e (parent) Document element: <xs:element name="Para"> <xs:complexType> <xs:simpleContent> <xs:extension base="paraType"> <xs:attribute name="classification" type="classificatio= nLevels" use="required"/> <xs:assert test="if (@classification eq 'top-secret') the= n ../Document/@classification eq 'top-secret') ... /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> This is not allowed, correct? /Roger From mike@s... Wed Apr 29 14:03:36 2009 Received: from maggie.w3.org ([193.51.208 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
