GNOME Bugzilla – Bug 140763
multiple non-nested xincludes not outputting fallback
Last modified: 2009-08-15 18:40:50 UTC
rnowakow@murdock:~/fallback_test$ cat test.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> <article> <articleinfo> <title>Test Article</title> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="subtitle.xml"> <xi:fallback><subtitle><emphasis>Warning: please put subtitle here!</emphasis></subtitle></xi:fallback> </xi:include> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="date.xml"> <xi:fallback><date><emphasis>Warning: please put date here!</emphasis></date></xi:fallback> </xi:include> </articleinfo> </article> rnowakow@murdock:~/fallback_test$ xsltproc --xinclude /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl test.xml > test.html warning: failed to load external entity "subtitle.xml" warning: failed to load external entity "date.xml" warning: failed to load external entity "date.xml" rnowakow@murdock:~/fallback_test$ cat test.html <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Test Article</title><meta name="generator" content="DocBook XSL Stylesheets V1.64.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id2428485"></a>Test Article</h1></div><div><h3 class="subtitle"><i><span class="emphasis"><em>Warning: please put subtitle here!</em></span></i></h3></div></div><div></div><hr></div></div></body></html> <date><emphasis>Warning: please put date here!</emphasis></date> ...should also be output but is not.
This is a similar bug to libxml2 #140763.
The above comment should read: This is a similar bug to libxml2 #243580.
Your problem is a result of the stylesheet, and has no relationship to xinclude: bill@bbrack bug140763 $ cat bug1.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> <article> <articleinfo> <title>Test Article</title> <subtitle><emphasis>Warning: please put subtitle here!</emphasis></subtitle> <date><emphasis>Warning: please put date here!</emphasis></date> </articleinfo> </article> bill@bbrack bug140763 $ xsltproc docbook/xsl-stylesheets- 1.62.4/html/docbook.xsl bug1.xml <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO- 8859-1"><title>Test Article</title><meta name="generator" content="DocBook XSL Stylesheets V1.62.4"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id2625463"></a>Test Article</h1></div><div><h3 class="subtitle"><i><span class="emphasis"><em>Warning: please put subtitle here! </em></span></i></h3></div></div><div></div><hr></div></div></body></html> Bill