XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Use of ID/IDREF in XSD

I have a schema with a lot of xsd:ID and xsd:IDREF. I’m trying to add some assertions to a redefined schema that require dereferencing the id. Here is an assert:

 

<xs:assert test="id(PersonId)/Profession/@label != ''" xpathDefaultNamespace="##defaultNamespace"/>

 

However, when testing an instance, Saxon throws Description: Element n1:Candidate does not satisfy assertion id(PersonId)/Profession/@label != ''”

 

XMLSpy is similarly displeased.

 

From what I’ve read on the internet, idref and id can only be used with DTD? I’m not sure why, a schema aware engine should be able to infer the data types of the tags as well.

 

Code is here:

https://gist.github.com/JDziurlaj/863f9f466b22b32bdc671e35555b7416

 

John Dziurłaj

 

Elections Consultant

Hilton Roscoe LLC
Cell 330-714-8935 Work/Fax 234-706-6434

 

PGP Fingerprint: 8466 BB28 6A92 EE06 F71D 1519 FB42 2861 6DC0 E92C

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS