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] Annotations in the non-XML syntax


Mike,
   Your stylesheet could peel off XHTML and simply <xsl:copy/> it to an output html file.
Or, perhaps, the TC could offer a recommended use of the ibtwsh vocabulary for documentation.  
Using John's ibtwsh.rng file in conjunction with the rng4rng schema, you could validate
a RELAX NG schema file with embedded documentation, then create custom stylesheets around the 
combination of the two.

   and on a related topic...

   Attached is a stylesheet that pretty prints a RELAX NG file. It doesn't do
anything with foreign elements yet.   Also attached is a 'pretty printed' version of
the rng4rng schema document, after running it thru this stylesheet.  

   With printout this 'pretty', who needs documentation? ;)

Enjoy! tom


 

-----Original Message-----
From: Michael Fitzgerald [mailto:mike@wyeast.net]
Sent: Thursday, March 21, 2002 6:41 PM
To: James Clark; RELAX NG List
Subject: RE: [relax-ng] Annotations in the non-XML syntax


I think Javadoc encourages coders to document their code better because it
is easy to make pretty HTML documentation.

We could do something similar by offering (at least informally) some
pretty-print stylesheets for pulling a:documentation, DocBook, or XHTML
annotations from RELAX NG schema.

The attached stylesheet is a meager beginning (revised from my last post on
this). I am happy to spend some more time on this, but I need critical
comments.

Mike

-----Original Message-----
From: James Clark [mailto:jjc@jclark.com]
Sent: Wednesday, March 20, 2002 5:13 AM
To: John Cowan; Michael Fitzgerald
Cc: RELAX NG List
Subject: Re: [relax-ng] Annotations in the non-XML syntax



> I'd rather map the # comments into <!-- ... --> comments

I will try and do this, though it's not altogether straightforward. However,
I feel a little bit uneasy in that it will tend to encourage people to put
documentation in comments rather than annotations.  I would like to find
some way for the non-XML syntax to make it as easy to put documentation in
annotations as in comments.

James


Attachment: prettyPrintRNG.xsl
Description: prettyPrintRNG.xsl

    grammar

<grammar
  datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
  ns="http://relaxng.org/ns/structure/1.0"
>
pattern
</grammar>

    pattern

choice
element element
choice
attribute name : QName
element attribute
choice
attribute name : QName
interleave
optional
element group
element interleave
element choice
element optional
element zeroOrMore
element oneOrMore
element mixed
element ref
attribute name : NCName
element parentRef
attribute name : NCName
element empty
element text
element value
optional
attribute type : NCName
<text/>
element data
attribute type : NCName
interleave
group
zeroOrMore
element param
attribute name : NCName
<text/>
optional
element except
element notAllowed
element externalRef
attribute href : anyURI
element grammar

    grammar-content

interleave
zeroOrMore
choice
element include
attribute href : anyURI

    include-content

interleave

    start-element

element start

    define-element

element define
attribute name : NCName

    combine-att

optional
attribute combine
choice
"choice"
"interleave"

    open-patterns

interleave
oneOrMore

    open-pattern

interleave

    name-class

choice
element name
data type=QName

    except-name-class

interleave
optional
element except

    open-name-classes

interleave
oneOrMore

    open-name-class

interleave

    common-atts

optional
attribute ns
optional
attribute datatypeLibrary : anyURI
zeroOrMore
attribute
anyName
except
nsName
nsName ns=""

    other

zeroOrMore
element
anyName
except
nsName
zeroOrMore
choice
attribute
anyName
<text/>
any

    any

element
anyName
zeroOrMore
choice
attribute
anyName
<text/>
any



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


Powered by eList eXpress LLC