xsl-list
[Top] [All Lists]

RE: How to put space between two characters?

2004-04-08 15:27:05
At 2004-04-08 09:58 -0700, puja thakral wrote:
Thanks for the reply Ken but I tried your way and it
gives me the error 'The stylesheet does not contain a
document element. The stylesheet may be empty, or it
may not be a well-formed XML document'

It sounds like perhaps your XML declaration isn't on the first line of the file or you have a garbage character on the first line of the file.

I did a copy/paste of the first 10 lines of your stylesheet into a file on my system and had no problems.

Here is my code.I just added those three lines given
by you but by adding thode lines,code doesn't seems to
work.

Then either there was a transcription problem or the processor you are using is not handling it properly. The three lines I gave you are used in many of my stylesheets.

I've attached below proof that there are no problems thrown when adding those lines to a stylesheet.

In case u've trouble seeing the code,I've
attached it as an attachment.

Even as an attachment it showed up across the network as an inline mess ... this mail list doesn't provide for attachments. As a result, I still cannot see past your template rule for dataroot.

But you can see from my test below that there is nothing impacting on a stylesheet by the addition of those lines ... I expect you have a transcription error.

I hope this helps.

........................... Ken

T:\ftemp>type puja.xsl
<?xml version='1.0' encoding="UTF-8"?>

<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#xa0;">
]>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:fo="http://www.w3.org/1999/XSL/Format";
xmlns:xlink="http://www.w3.org/1999/xlink";>
<xsl:output omit-xml-declaration="yes" indent="yes"/>

<xsl:template match="/">
 Test&nbsp;here
</xsl:template>

</xsl:stylesheet>

T:\ftemp>saxon puja.xsl puja.xsl >j

T:\ftemp>

--
Public courses: Spring 2004 world tour of hands-on XSL instruction
Each week:   Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO
Hong Kong May 17-21; Bremen Germany May 24-28; Helsinki June 14-18

World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/s/bc