xsl-list
[Top] [All Lists]

Re: [xsl] Why does this XPath expression work fine when run inOxygen but fails when used in an XSD 1.1 assert element?

2019-12-03 00:22:28
Hi Roger,

On Tue, Dec 3, 2019 at 12:11 AM Michael Kay mike(_at_)saxonica(_dot_)com <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 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
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>