[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: pesky & and fop

Subject: Re: pesky & and fop
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Wed, 09 Oct 2002 22:56:08 +0200
xsl fo bullets
eoin walsh wrote:
I'm trying to dynamically insert some special characters (bullet point for example - &#8226;) into a pdf produced using xsl + fop.

The XML input is built using something like

<snip>

String value = "&#8226";
Use
 String value = "\u8226";
instead (untested, look up details in the Java documentation).

 Transformer transformer = tbf.newTransformer(new StreamSource(xslfile));
 DOMResult domResult = new javax.xml.transform.dom.DOMResult();
 transformer.transform(new javax.xml.transform.dom.DOMSource
(thedoc),domResult);
 // Now you can get the output Node from the DOMResult.
 Document result = (Document) domResult.getNode();

Not a chance. The following:
<fo:block><xsl:value-of select="THEBIGONE" disable-output-
escaping="yes"/></fo:block>
will *only* work if you use a StreamResult.

Take some time to think about the whole stuff: XML character references
happen to occur in a *serialized XML* document only. In APIs, you encode
characters according to the conventionss of the programming language,
*except* when you are passing strings to a parser. A DOM document is
not parsed like an XML file.

J.Pietschmann



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.