Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XSD datatypes

Reply
Thread Tools

XSD datatypes

 
 
Jason S
Guest
Posts: n/a
 
      04-01-2008
I'm using RELAX NG but my question is about XSD datatypes. Is there
any way to combine patterns? Right now I have this: (a chain of
identifiers, the first being strict e.g. starting w/ letter or
understore, the rest can be letters, numbers or underscore, the
separator being a '.')

<define name='identifier-chain'>
<data type="token">
<param name="pattern">([A-Za-z_][A-Za-z_0-9]*)(\.[A-Za-
z_0-9]+)*</param>
</data>
</define>

is there any way to break this up into sub-patterns?
e.g.

<define name='identifier'>
<data type="token">
<param name="pattern">[A-Za-z_][A-Za-z_0-9]*</param>
</data>
</define>
<define name='secondary-identifier'>
<data type="token">
<param name="pattern">[A-Za-z_0-9]+</param>
</data>
</define>
<define name='identifier-chain'>
<ref name='identifier' />
<zeroOrMore>
<data type="token">
<value>.</value>
<ref name='secondary-identifier' />
</data>
</zeroOrMore>
</define>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML + XSD: Is it possible to get all errors against the XSD? Markus Java 1 11-22-2005 02:53 PM
Difference between <import ....xsd> and <xlink:href=.....xsd> ???? Bernd Oninger XML 1 06-30-2004 08:21 AM
xsd:any as a child of xsd:all Peter Aberline XML 0 04-05-2004 03:38 PM
referencing another XSD file within an XSD file JavaDeveloper@nowhere.com XML 1 01-14-2004 05:22 PM
XSD document for XSD defintion Rick Razzano XML 1 09-26-2003 12:41 AM



Advertisments