Any way for DocBook to contain other XML grammar?

Questions about XML that are not covered by the other forums should go here.
Zearin
Posts: 107
Joined: Mon Jul 30, 2007 11:31 pm
Location: College Park, MD, United States

Any way for DocBook to contain other XML grammar?

Post 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?
-- Zearin
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

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

Post 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
Zearin
Posts: 107
Joined: Mon Jul 30, 2007 11:31 pm
Location: College Park, MD, United States

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

Post 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. :(
-- Zearin
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

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

Post 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
Post Reply