ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xml-dev
xml-dev
Re: [xml-dev] Relax NG annoyances
by Jeni Tennison other posts by this author
Jul 3 2003 9:41AM messages near this date
Re: [xml-dev] Relax NG annoyances | Re: [xml-dev] Relax NG annoyances
Hi,

Robin Berjon wrote:
>  A fair number of vocabularies created before XML Schema or RelaxNG
>  have comma or semicolon separated lists. Another example could be
>  the list of commands in SVG path data. But as tempting as it is to
>  want to fix this with lists, I think that having a nice way of
>  declaring compound types (à la Regular Fragmentation, but without
>  changing the tree) would be the most general and elegant solution to
>  this.

At his RELAX NG tutorial at XML 2002, John Cowan mentioned the
possibility of extending RELAX NG patterns into text content, so, for
example, to get pairs of numbers in which the numbers in a pair were
separated by commas and the pairs were separated by whitespace, you
might use something like:

<define name="path"> 
  <ref name="numberPair" /> 
  <zeroOrMore> 
    <whitespace /> 
    <ref name="numberPair" /> 
  </zeroOrMore> 
</define> 

<define name="numberPair"> 
  <data type="decimal" /> 
  <value> ,</value>
  <data type="decimal" /> 
</define> 

I have no idea whether this is an idea that's being pursued?

The argument that there should be a separate way of defining datatype
libraries, with RELAX NG schemas (and other technologies) just
referencing an appropriate one, seems persuasive. A combination of the
datatype-oriented definitions ala XML Schema and regex-based
definitions, like the one above, seems pretty powerful. Presumably
this is something that Part 5 (Datatypes) of DSDL is addressing?

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org> , an
initiative of OASIS <http://www.oasis-open.org> 

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl> 
Thread:
Jimmy Cerra
Bob Foster
Jeni Tennison
Rick Jelliffe
Jeni Tennison
Rick Jelliffe
Jeni Tennison
James Clark
Robin Berjon
Jeni Tennison
Robin Berjon
Amelia A. Lewis
Berend de Boer
=?ISO-8859-1?Q?Bill_de_h=D3ra?=

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved