Page 1 of 1

Any way for DocBook to contain other XML grammar?

Posted: Mon Feb 02, 2009 4:11 pm
by Zearin
I'm working on a personal project that is part article and part data. The article portion is written in DocBook 5. The data part is a custom schema (written in Relax-NG compact, if it matters).

My question is: While I'm sitting there writing my article, and I start a new <section>, I want to reference one of the other XML documents. I'd rather do it without just linking to the document, because that is not the representation I am going for. Is this possible?

Re: Any way for DocBook to contain other XML grammar?

Posted: Mon Feb 02, 2009 5:40 pm
by sorin_ristache
Hello,

I don't really understand: do you want to include other XML file or a fragment of other XML file in a DocBook 5 Article file but you do not want to use XInclude? What is the representation/the way of referencing the other XML document that you intend to use?


Regards,
Sorin

Re: Any way for DocBook to contain other XML grammar?

Posted: Mon Feb 02, 2009 7:53 pm
by Zearin
I guess I could use XInclude with XPath. That would make sense, and allow me to include an entire external document, or just the part that is relevant.

The trouble is, those external documents are not DocBook, so even when I use XInclude, the validator sees that the referenced file is not DocBook and so I get an error. :(

Re: Any way for DocBook to contain other XML grammar?

Posted: Tue Feb 03, 2009 1:02 pm
by sorin_ristache
Hello,

You did not specify details about your document but if you want to generate output from your document you have to include a fragment of a DocBook document. Otherwise you can modify the DocBook schema for allowing your XML elements in the point where you insert them.


Regards,
Sorin