Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > xsltproc and Entities

Reply
Thread Tools

xsltproc and Entities

 
 
Brett
Guest
Posts: n/a
 
      02-27-2004
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?
 
Reply With Quote
 
 
 
 
Alain Ketterlin
Guest
Posts: n/a
 
      03-01-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
xsltproc question - I am clueless and a newbie, so don't be too roughon me! Glen Millard XML 10 03-12-2012 09:41 PM
xsltproc and multiple-line text Arndt Jonasson XML 1 04-25-2007 01:32 PM
xsltproc and DocBook Darel Finkbeiner XML 5 03-22-2007 02:09 PM
HTML::Entities::encode() returning wrong(?) entities Jim Higson Perl Misc 3 07-25-2004 09:13 PM
[xsltproc] Empty elements in output document yzzzzz XML 0 11-12-2003 10:38 PM



Advertisments