xsltproc and Entities

Discussion in 'XML' started by Brett, Feb 27, 2004.

  1. Brett

    Brett Guest

    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?
    Brett, Feb 27, 2004
    #1
    1. Advertising

  2. (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
    to denote carriage return?

    -- Alain.
    Alain Ketterlin, Mar 1, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. yzzzzz
    Replies:
    0
    Views:
    712
    yzzzzz
    Nov 12, 2003
  2. Darel Finkbeiner

    xsltproc and DocBook

    Darel Finkbeiner, Mar 21, 2007, in forum: XML
    Replies:
    5
    Views:
    814
    Joseph Kesselman
    Mar 22, 2007
  3. Arndt Jonasson

    xsltproc and multiple-line text

    Arndt Jonasson, Apr 25, 2007, in forum: XML
    Replies:
    1
    Views:
    875
    Joseph Kesselman
    Apr 25, 2007
  4. Glen Millard
    Replies:
    10
    Views:
    1,520
    Peter Flynn
    Mar 12, 2012
  5. Jim Higson
    Replies:
    3
    Views:
    223
    Eric Amick
    Jul 25, 2004
Loading...

Share This Page