[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
eoin walsh wrote:
Not a chance. The following:
J.Pietschmann
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Re: [xsl] pesky & and fop
Subject: Re: [xsl] pesky & and fop From: "J.Pietschmann" <j3322ptm@xxxxxxxx> Date: Wed, 09 Oct 2002 22:56:08 +0200 |
eoin walsh wrote:
I'm trying to dynamically insert some special characters (bullet point for example - •) into a pdf produced using xsl + fop.
The XML input is built using something like
<snip>
String value = "•";
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:
will *only* work if you use a StreamResult.<fo:block><xsl:value-of select="THEBIGONE" disable-output- escaping="yes"/></fo:block>
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] pesky & and fop, eoin walsh | Thread | [xsl] Abbreviated form of XSLT?, Gustaf Liljegren |
Re: [xsl] XSLT Processor - root nod, Joseph Kesselman | Date | RE: [xsl] Abbreviated form of XSLT?, Passin, Tom |
Month |