OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Relax NG annoyances

[ Lists Home | Date Index | Thread Index ]

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/





 

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

Copyright 2001 XML.org. This site is hosted by OASIS