OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: DOCBOOK: DocBook XSL stylesheet loses whitespace with MSXML


I'm running into some whitespace issues with the MSXML parser and the
standard XSL stylesheet for converting DocBook to HTML.

Consider the following sample DocBook document:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book SYSTEM
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
<book>
	<chapter>
		<title>Test</title>
	
<screen><prompt>C:\&gt;</prompt><userinput>dir</userinput>
<prompt>C:\&gt;</prompt>exit</screen>
	</chapter>
</book>

When using the Saxon XSL processor to transform this to HTML according
to the standard XSL stylesheet from http://docbook.sourceforge.net, the
output of the <screen> element looks like this on the page:

C:\>dir
C:\>exit

If instead I use the MSXML processor (e.g. by adding an
<?xml-stylesheet?> processing instruction to the file and loading it in
Internet Explorer), the output looks like this:

C:\>dirC:\>exit

From tinkering with the test document, it seems like MSXML is dicarding
any whitespace-only text nodes in the <screen> element.

Can anyone explain this behaviour? Can anyone suggest a
modification/extension to the standard XSL stylesheet for DocBook that
would prevent this from happening? I've been at this for hours and have
been unable to figure out what's tripping up MSXML.

___________________________________

Kevin Yank
Technical Business Director
SitePoint.com - Master the Web!

e: kevin@sitepoint.com
w: www.sitepoint.com
p: +61 3 9495 6622
___________________________________




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC