[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

Subject: Re: Why does this XPath expression work fine when run inOxygen but fails when used in an XSD 1.1 assert element?
From: "Mukul Gandhi gandhi.mukul@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 3 Dec 2019 06:22:22 -0000
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.