XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] XML Schema 1.1 xpath 2.0 regex question

`\n` in XPath (hosted in XML) doesn't represent a newline character. For a newline character, write `
`.

Michael Kay
Saxonica

On 22 Dec 2021, at 09:11, Mukul Gandhi <mukulg@softwarebytes.org> wrote:

Hi all,
   I've following question, related to this topic.

Within an XSD 1.1 schema, I've following asserts,

<xs:assert test="matches('j', '.')"/>
<xs:assert test="matches('\n', '.')"/>
<xs:assert test="matches('\r', '.')"/>

Both Xerces, and Saxon say that the asserts above return true result (i.e all the matches succeed).

The XSD 1.1 data types spec within the section "G.4.2.5 Multi-character escapes" says,

For character sequence . , the equivalent character class is [^\n\r] (which as I can understand means, any character except \n and \r). Therefore, shouldn't the 2nd and 3rd asserts above return false result?


--
Regards,
Mukul Gandhi



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS