[Home] [By Thread] [By Date] [Recent Entries]

  • From: John Dziurlaj <john@h...>
  • To: xml-dev@l...
  • Date: Fri, 22 Feb 2019 12:08:54 -0500

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]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member