W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2002

RE: Help me please

From: Sridhar Raju Y <sridhar_y@infy.com>
Date: Tue, 16 Apr 2002 15:56:02 +0530
Message-ID: <7727B4DFC8F2D41183E700B0D049D4BC0237AB18@bhumsg02.ad.infosys.com>
To: "Jeni Tennison" <jeni@jenitennison.com>
Cc: <xmlschema-dev@w3.org>
Thanks for your help Jeni !!!


-----Original Message-----
From: Jeni Tennison [mailto:jeni@jenitennison.com]
Sent: Tuesday, April 16, 2002 3:05 PM
To: Sridhar Raju Y
Cc: xmlschema-dev@w3.org
Subject: Re: Help me please

Hi Sridhar,

> I am unable to understand the pattern mentioned in xml schema file.
> <xsd:pattern value="[\i-[:]][\c-[:]]*:[\i-[:]][\c-[:]]*(@start|@end)"/>
> The above one is the pattern specified in schema file . I'ld like to
> know how it looks like in instance document.
The pattern [\i-[:]] means "any character that can be the initial
character of an XML name, except a colon" and the pattern [\c-[:]]
means "any character that can be a character within an XML name,
except a colon". Put them together as [\i-[:]][\c-[:]]* and you have
"any XML name, without a colon in it", in other words an xs:NCName
(non-colonised name) such as:


The start of your pattern has a xs:NCName, followed by a colon,
followed by an xs:NCName. Together, that makes a qualified name
(xs:QName), so something like:


After this qualified name, you have a choice between two patterns. The
@ isn't significant in a regular expression, so the two strings are
literally "@start" or "@end".

So a matching string for the entire pattern might look like:






or anything that's a qualified name immediately followed by either
'@start' or '@end'.



Jeni Tennison
Received on Tuesday, 16 April 2002 06:29:06 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:56 UTC