Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   xsltproc and Entities (http://www.velocityreviews.com/forums/t166738-xsltproc-and-entities.html)

Brett 02-27-2004 05:32 PM

xsltproc and Entities
 
I am producing some formatted text using xslt, and therefore have a
lot of carriage returns. Instead of placing a:
<text>
</text>
everywhere I decided to form an entity like so:
<!DOCTYPE stylesheet [
<!ENTITY cr "<xsl:text>
</xsl:text>">
]>

and then place a &cr; everywhere I want a carriage return. It works
fine in xmlspy, but when using xsltproc, I get namespace errors,
specifically:
"warning: Namespace prefix xsl is not defined"
and
"compilation error: file foo.xslt line 1 element text
Namespaces prefix used for multiple namespaces"

Any idea on what I am doing wrong?

Alain Ketterlin 03-01-2004 07:57 AM

Re: xsltproc and Entities
 
godot_gildor@yahoo.com (Brett) writes:

> I am producing some formatted text using xslt, and therefore have a
> lot of carriage returns. Instead of placing a:
> <text>
> </text>
> everywhere I decided to form an entity like so:
> <!DOCTYPE stylesheet [
> <!ENTITY cr "<xsl:text>
> </xsl:text>">
> ]>
>
> and then place a &cr; everywhere I want a carriage return. It works
> fine in xmlspy, but when using xsltproc, I get namespace errors,
> specifically:
> "warning: Namespace prefix xsl is not defined"


Which is probably true at the time the parser reads the internal
subset... DTDs are definitely problematic with namespaces.

By the way, why not use &#xA; to denote carriage return?

-- Alain.


All times are GMT. The time now is 04:11 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.