Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSL - White Space 1

Status
Not open for further replies.

GillyInOz

Programmer
Mar 18, 2003
10
0
0
AU
Hello - I have 2 projects one in .net (VB.net and ASP.net) the other in VB6 and ASP - both create an XML document for transformation into HTML.

I want to use a non break white space ie & nbsp inside the XSL so at top of my document I have added the line

<!DOCTYPE xsl:stylesheet [<!ENTITY nbsp &quot; &quot;>]>

folowed by the rest of my XSL statements
<xsl:stylesheet xmlns:xsl=&quot; version=&quot;1.1&quot;>

<xsl:eek:utput method=&quot;xml&quot; indent=&quot;yes&quot;/>
.
.
.
etc

This all works fine in the .net project.

When I do the same in my non .net project xsl file I get this error on the transform statement.

&quot;The stylesheet does not contain a document element. The stylesheet may be empty, or it may not be a well-formed XML document. &quot;.

Also when I use XSL Debugger (v good tool u can get from from TopXML.com) I get the error message - &quot;The element 'xsl:stylesheet' is used but not declared in the DTD schema&quot;. I also get this error when using the stylesheet that works ! But the transformation doesn't

I've done a work around with padding but it justs bugs me why it doesn't work

any takers ??

thanks

Graham
 
You don't need to declare it. Just use the built in entity of & #xa0 ; (remove space after & and before ; as usual)
 
thanks - that works fine.

Thanks for your help

Graham
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top