forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: XML validation
Date Thu, 31 Oct 2002 07:56:24 GMT
On Thu, Oct 31, 2002 at 06:05:18PM +1100, David Crossley wrote:
> Excellent work Jeff. I am itching to try it out.
> 
> I do not know if you are on cocoon-dev, but we have
> been experimenting with RELAX NG validation (via Ant
> at build-time) of the main config files, and perhaps
> later with xdocs.
> 
> We have often discussed RNG here on forrest-dev. Should we
> have multiple validation systems in Forrest? I think so.

Definitely.  Switching on validation is likely to highlight the drawbacks
of using DTDs.  For instance, I found that half my docs don't validate
because I'm using XInclude <xi:include> tags.  I'm highly in favour of
adding RNG schema tests, since we can do much stricter validation.

I'm currently busy writing up an example of how to deal with things like
<xi:include> tags, by overriding and extending document-v11.dtd.  The
quality DTD design work by Steven and Stefano is now paying off - we
would have been in a real mess if we were using document-v10.dtd.

> > To have custom project XML types validated, list them in
> > $project/src/documentation/resources/schema/catalog.  Eg for Anteater,
> > I've got:
> > 
> > -- OASIS TR 9401 Catalog for Forrest --
> > OVERRIDE YES
> > -- Anteater custom doctype --
> > PUBLIC "-//APACHE//DTD XML Documentation V1.0//EN" "dtd/xmldoc-v10.dtd"
> 
> Gee, that is a real PublicId or just a fictional example?
> I was only aware of "-//APACHE//DTD Documentation V1.0//EN"
> which is used by Cocoon.

It's an extension of documentv10 that Ovidiu and I are using for the
Anteater user manual.  It provides custom tags for documenting XML
grammars (in our case, Ant tasks):

<element name="httpRequest">
  <title> ... </title>
  <description> ... </description>
  <attributes>
    <attribute name="host" type="String" defvalue="localhost">
        ...
    </attribute>
    ...
  </attributes>
  <elements>
    <elementref name="contentEquals">
      ...
    </elementref>
    ...
  </elements>
  <examples>
    <example> ... </example>
    ...
  </examples>
</element>

As an example of the HTML output, see
http://aft.sourceforge.net/manual/Test%20tasks.html

I could update it to documentv11 and add it to Forrest if anyone wants
to reuse this.


--Jeff


> --David
> 

Mime
View raw message