|
Subject: Re: [xsl] 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 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Why does this XPath expre, Michael Kay mike@xxx | Thread | [xsl] best practices for using XSLT, Mukul Gandhi gandhi. |
| Re: [xsl] current() and position()?, Dimitre Novatchev dn | Date | [xsl] best practices for using XSLT, Mukul Gandhi gandhi. |
| Month |