Kevin Flynn wrote:
> 
> I need to add documentation to some RNG schemas. The standard method of 
> doing this appears to be to use the annotations namespace's 
> documentation element. However, this only allows plain text (no child 
> elements), which means no formatting of the documentation text. So I am 
> considering using docbook elements instead - the Relax NG specification 
> seems to allow this, I think.
> 
> I have experimented a little with XmlMind:
> 
> - added the docbook namespace to an RNG file
> - added some documentation using  docbook elements
> - opened the file in XmlMind
> 
> and the result validates.  However, if I  write some invalid docbook, or 
> remove the docbook namespace declaration, it still validates. Not too 
> surprising, since there is nothing to tell XmlMind where to look for the 
> docbook schema. Validation of RNG files in XmlMind appears to be "built 
> in" - the addons folder contains no config for RNG. Consequently there 
> is nowhere for me to add a reference to the docbook schema.
> 
> Is there a way to do what I want to do with XmlMind? Or (supplementary 
> question) is what I'm trying to do actually not allowed by the RNG 
> schema or  maybe just really stupid?
> 
> Hope you can enlighten me a little here...
> 

--> You need to create a configuration for RNG schemas + DocBook 5 
documentation.

We have created such configuration for W3C XML Schema + XHTML (*styled*) 
documentation so it's feasible. You can use the "W3C XML Schema 
configuration" add-on as an example. See attached screen shot.



--> In order to do this, you need a copy of the RELAX NG Schema for 
RELAX NG. This schema is public and normalized: 
http://relaxng.org/spec-20011203.html (I've attached a copy to this email).

This schema allows RELAX NG patterns to contain ``alien elements''. Your 
DocBook 5 documentation elements are such ``alien elements''.

In itself, the RELAX NG Schema for RELAX NG does not validate the 
contents of alien elements. It merely allows you to insert them at 
certain places.

Therefore your configuration should not be based on the stock RELAX NG 
Schema for RELAX NG but on a variant importing the DocBook 5 RELAX NG 
schema.

Normally creating such composite schema is simple, clean and elegant (we 
did that successfully for DocBook 5+MathML) but how to do it is out of 
the scope of this mailing list.



--> Recommended reading: "RELAX NG" by Eric van der Vlist -- 
http://oreilly.com/catalog/9780596004217/

http://books.xmlschemata.org/relaxng/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rng4rng.rng
Url: 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20080626/00c0dddf/attachment.bat
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot.png
Type: image/png
Size: 98442 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20080626/00c0dddf/attachment.png
 

Reply via email to