XInclude of DocBook Slides in standard DocBook
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 3
- Joined: Thu Mar 01, 2007 8:59 pm
- Location: Hannover, Germany
XInclude of DocBook Slides in standard DocBook
Hello,
I've made some slides with the DocBook Slides RelaxNG schema (http://docbook.sourceforge.net/release/slides/current).
Now I want to include some of the content of the slides in a standard DocBook (Version 5) document via XInclude. When I edit in author mode, I see the contents from the slide. But when I try to transform the DocBook document (using the standard "Docbook HTML" transformation scenario) with the XIncludes, the content from the slide document is literally copied and escaped into the document (inside span tags with color red). For every tag in the slides I get an error message (Warning) like this:
Element xxx in namespace '' encountered in yyy, but no template matches.
Apparently, each namespace (DB and DB slides) has its own namespace and needs its own XSL file.
Is there a way to combine the Stylesheets for DB and DB slides?
I've made some slides with the DocBook Slides RelaxNG schema (http://docbook.sourceforge.net/release/slides/current).
Now I want to include some of the content of the slides in a standard DocBook (Version 5) document via XInclude. When I edit in author mode, I see the contents from the slide. But when I try to transform the DocBook document (using the standard "Docbook HTML" transformation scenario) with the XIncludes, the content from the slide document is literally copied and escaped into the document (inside span tags with color red). For every tag in the slides I get an error message (Warning) like this:
Element xxx in namespace '' encountered in yyy, but no template matches.
Apparently, each namespace (DB and DB slides) has its own namespace and needs its own XSL file.
Is there a way to combine the Stylesheets for DB and DB slides?
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: XInclude of DocBook Slides in standard DocBook
Post by sorin_ristache »
Hello,
You should include in a DocBook XML document (article, book, etc) only a fragment of a Slides document that keeps the DocBook document valid. You cannot include any Slides fragment in a DocBook document because they are two different types of XML documents with different purposes. The Slides documents are presented as a sequence of slides but a DocBook document is processed as one document (a book, an article). If you include an element that is not accepted by the DocBook schema you get the error "<slides-child-element> encountered in <slides-parent-element>, but no template matches" when you transform it with the DocBook XSL stylesheets.
Not only the element name, but the fully qualified name of the element (that is namespace prefix plus element name) must be accepted by the namespace. For example in your case in a DocBook 5 document (in which every element has the namespace "http://docbook.org/ns/docbook") you cannot include a fragment from a Slides document with XInclude because the Slides document has no namespace. However you can include such a fragment in a DocBook 4 document which has also no namespace.
So the cause of the error that you get is that the fully qualified name of an included element makes the document which includes the element invalid. Usually elements that are not accepted by the DocBook schema are not handled by the DocBook XSL stylesheet.
Regards,
Sorin
You should include in a DocBook XML document (article, book, etc) only a fragment of a Slides document that keeps the DocBook document valid. You cannot include any Slides fragment in a DocBook document because they are two different types of XML documents with different purposes. The Slides documents are presented as a sequence of slides but a DocBook document is processed as one document (a book, an article). If you include an element that is not accepted by the DocBook schema you get the error "<slides-child-element> encountered in <slides-parent-element>, but no template matches" when you transform it with the DocBook XSL stylesheets.
Not only the element name, but the fully qualified name of the element (that is namespace prefix plus element name) must be accepted by the namespace. For example in your case in a DocBook 5 document (in which every element has the namespace "http://docbook.org/ns/docbook") you cannot include a fragment from a Slides document with XInclude because the Slides document has no namespace. However you can include such a fragment in a DocBook 4 document which has also no namespace.
So the cause of the error that you get is that the fully qualified name of an included element makes the document which includes the element invalid. Usually elements that are not accepted by the DocBook schema are not handled by the DocBook XSL stylesheet.
Regards,
Sorin
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service