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


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: Re: [relax-ng] Conversion of comments between the compact and the XMLsyntax

>> It seems to me that the annotation should be included in what is
>> described (especially if you want to extract documentation) and that if
>> I want to document a complex regular expression within a pattern, the
>> annotation should be included in the "pattern" element rather than
>> following it.
> Why?  The spec (DTD Compatibility) explicitly allows a:documentation to
> follow the RELAX NG element to which it applies.  This done precisely to
> allow annotation of param/value/name.

Also note that Trang supports this.  For example, this RNG

<element name="foo" 
  <data type="string">
    <param name="pattern">[A-Za-z]+</param>
    <a:documentation>Any letter</a:documentation>

will turn into this XSD

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
  <xs:element name="foo">
      <xs:restriction base="xs:string">
        <xs:pattern value="[A-Za-z]+">
            <xs:documentation>Any letter</xs:documentation>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC