[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Why does this XPath expression work fine when run
Hi Roger, On Tue, Dec 3, 2019 at 12:11 AM Michael Kay mike@xxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Secondly, the spec says that by default, assertions can't see comments and > PIs. In other words, users can add comments and PIs to the instance without > worrying about whether the schema allows them. Again, that's based on a > theory about what comments and PIs are intended for. But here the spec > relaxes the rules, and says that "at user option" comments and PIs can be > made visible to assertions. Saxon provides such an option > (--assertionsCanSeeComments:true on the command line). But they're only > visible if they're in the subtree of the element being validated. > Your original error message said, Assertion evaluation ('*[local-name(.) eq 'style']/following-sibling::comment()[1]/starts-with(., '[if gte mso 9]><xml>')') for element 'head' on schema type 'headType' did not succeed. (This looks to be a message generated by Xerces validator) What Mike has written above, is also supported by Xerces, i.e with an user option assertion XDM trees can contain comments and PIs. I think that, Oxygen XML IDE has an option to toggle this XSD validation feature. Of course, you may also use Saxon if you wish. -- Regards, Mukul Gandhi
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|