473,322 Members | 1,259 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

xsltproc and DocBook

This may be the wrong group, so let me know.

My "problem" is this: I am writing my commentary in DocBook 5 and
using the program xsltproc and the docbook5 XSL stylesheets to produce
XHTML output. Since it is a commentary, it has both English and
polytonic Greek with combining diacritics in it. My console and VIM
are both perfectly configured to allow me to edit such documents in a
very natural and easy way, and one in which I can actually read the
Greek that I've typed in.

After processing with xsltproc, all of my beautiful UTF-8 encoded
Greek is being transformed into butt-ugly entity references.

Now, I suppose, "technically speaking", this isn't an issue when
viewing the html document in a browser.... maybe. But I like to be
able to view and "debug" the resulting file in a text editor as I want
to ... additionally, how am I to be sure that the "correct" UTF-8
code points are being used for crucial combining marks ( and by
"correct", I mean the exact code points that I have chosen to use,
since there are alternatives in the unicode standard )? I
specifically chose XHTML output because it is natively UTF-8, so why
convert them to entities in the first place?

My question is, how do I turn off this "feature"? Or can I? Or
should I use a different XSLT processor?

Mar 21 '07 #1
5 3444
Did you specify UTF-8 as your output encoding in the xsl:output directive?

If you did, and you're still getting everything converted to character
references... you may want to try another XSLT processor and see if its
serializer does a better job of taking advantage of UTF-8.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Mar 21 '07 #2
On Mar 21, 9:52 am, Joseph Kesselman <keshlam-nos...@comcast.net>
wrote:
Did you specify UTF-8 as your output encoding in the xsl:output directive?

If you did, and you're still getting everything converted to character
references... you may want to try another XSLT processor and see if its
serializer does a better job of taking advantage of UTF-8.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
It looks like the output method in the XSL stylesheet sets the
encoding correctly.....

<xsl:output method="xml" encoding="UTF-8" indent="no" doctype-
public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>

Any suggestions on a good XSLT processor?

Mar 21 '07 #3
"Darel Finkbeiner" <da**************@gmail.comwrites:
My question is, how do I turn off this "feature"? Or can I? Or
should I use a different XSLT processor?
You may try to not even mention XHTML in <xsl:output(make a new
"driver" xslt stylesheet, with only <xsl:outputand <xsl:includeof
the other xsl). xsltproc should not use any entity then.

-- Alain.
Mar 22 '07 #4
On Mar 22, 3:55 am, Alain Ketterlin <a...@dpt-info.u-strasbg.fr>
wrote:
"Darel Finkbeiner" <darel.finkbei...@gmail.comwrites:
My question is, how do I turn off this "feature"? Or can I? Or
should I use a different XSLT processor?

You may try to not even mention XHTML in <xsl:output(make a new
"driver" xslt stylesheet, with only <xsl:outputand <xsl:includeof
the other xsl). xsltproc should not use any entity then.

-- Alain.
Amazing... you were absolutely correct. I changed the output to:

<xsl:output method="xml" encoding="UTF-8"/>

And suddenly it worked perfectly. Thanks for the tip, Alain!

Mar 22 '07 #5
Darel Finkbeiner wrote:
Amazing... you were absolutely correct. I changed the output to:
<xsl:output method="xml" encoding="UTF-8"/>
And suddenly it worked perfectly. Thanks for the tip, Alain!
Note that method="xhtml" is actually not defined in the XSLT 1.0
standard... but since XHTML is an XML language, outputting as XML should
work.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Mar 22 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dr. Laurence Leff | last post by:
I am having trouble doing the basics with xmlto on Redhat to convert DocBook XML into the various files. I believe the problem is the first line on the files: Here is starter file (notes.xml):...
1
by: Loudin | last post by:
Hello, I`ve got Problems with Xpath and xsltproc/libxslt. I have got a variable with tags in my Style sheet and later in the same Style sheet i want to work with this tags using a...
2
by: Yarco | last post by:
I'm learning for docbook under win32. I download: openjade-1_3_1-2-bin docbook-xml-4.4 docbook-dsssl-1.79 ldp.dsl And then copy all openjade bin\ to win32 system\, and then create a directory...
7
by: mike p. | last post by:
I have a docbook xml file, and am using standard docbook 1.61.3 xsl stylesheets to do xhtml transform. Transform works fine when using MSXML. When I try to do the following using asp.net 1.1: ...
3
by: Otmar Ganahl | last post by:
Hi! In my application I transform a docbook file to a html view using the webcontrol "Xml" (with a xsl).It works fine, except the using of the tag "fileref" in the docbook-file will cause an...
1
by: Will Parsons | last post by:
I am trying to get started with using Docbook/xml using free tools and am stymied in generating printable documentation from even the simplest source. I have attempted to generate a PDF using...
2
by: Joseph Kesselman | last post by:
Since the recent "Docbook on Windows" question brought this up... I did a bit of checking on the current status of these schemas, what they're intended for and how they interrelate. IBM's Robert...
0
by: danieldvv | last post by:
Hello, I need to convert a file.xml to file.html, my so is NetBSD 3.1 and i using this command line: $ xsltproc -o file.html /mystylesheet/docbood.xsl file.xml and i got this error msg: ...
1
by: Arndt Jonasson | last post by:
The way I read the XPath 1.0 specification, queries like "//*/ text()/.." and "//*/child::text()" should be valid. xmllint seems to agree with me, but xsltproc gives syntax errors for those...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.