W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2003

Re: Platform-indendent way of specifying line separator?

From: Jeni Tennison <jeni@jenitennison.com>
Date: Fri, 5 Sep 2003 10:59:18 +0100
Message-ID: <1121813374214.20030905105918@jenitennison.com>
To: "Roger L. Costello" <costello@mitre.org>
Cc: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>

Hi Roger,

> What regex (or Unicode symbol) is used to specify "line separator"?
> The regex (or Unicode symbol) must work regardless of the platform.

When an XML document is parsed, all "line separators" are converted to
a single newline character (#xA). (Well, almost all line separators;
in XML 1.0, the #x85 and #x2028 characters aren't, but in XML 1.1 they
are.) See http://www.w3.org/TR/REC-xml#sec-line-ends.

So it should be that:

  <pattern value="[a-zA-Z0-9]*\n" />

will do the trick, unless you want to account for the more obscure
platforms...

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Friday, 5 September 2003 05:59:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:39 GMT