External entity as CDATA

Discussion in 'XML' started by Soren Kuula, Mar 7, 2004.

  1. Soren Kuula

    Soren Kuula Guest

    Hi,

    I want to include som XML and DTD files into a DocBook document .. and I
    want the contents to remain unparsed. Sort of, instead of cpoying and
    pasting the code into the DocBook document :

    <programlisting>
    <![CDATA[blah blah blah]]>
    </programlisting>

    I want

    <!DOCTYPE ..... [
    <!ENTITY blahfile SYSTEM "blahfile.dtd">
    ]>

    <programlisting>
    <![CDATA[&blahfile;]]>
    </programlisting>

    Of course the above does not expand the entity; just evaluates to its
    name. But it should give in idea of what I am trying to do.

    Any way ?

    Soren

    --
    Fjern de 4 bogstaver i min mailadresse som er indsat for at hindre s...
    Remove the 4 letter word meaning "junk mail" in my mail address.
    Soren Kuula, Mar 7, 2004
    #1
    1. Advertising

  2. In article <ZHJ2c.105909$>,
    Soren Kuula <> wrote:

    >I want to include som XML and DTD files into a DocBook document .. and I
    >want the contents to remain unparsed. Sort of, instead of cpoying and
    >pasting the code into the DocBook document :


    I was going to say "that's impossible", but then I had an evil thought...

    <!ENTITY % blahfile SYSTEM "blahfile.dtd">
    <!ENTITY blahfile "<![CDATA[%blahfile;]]>">

    You'll have to put that in an external subset, because you can't use
    parameter entities that way in the internal subset. And you'd better
    not have any CDATA sections in blahfile.

    Don't tell anyone I suggested this.

    -- Richard
    --
    Spam filter: to mail me from a .com/.net site, put my surname in the headers.

    FreeBSD rules!
    Richard Tobin, Mar 7, 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. John Davison
    Replies:
    1
    Views:
    573
    Hal Rosser
    Jul 7, 2004
  2. Replies:
    3
    Views:
    740
    Joe Kesselman
    Mar 6, 2006
  3. Samuel van Laere

    Entity Name or Entity Number?

    Samuel van Laere, Feb 24, 2007, in forum: HTML
    Replies:
    4
    Views:
    1,599
    Jukka K. Korpela
    Feb 24, 2007
  4. markla
    Replies:
    1
    Views:
    533
    Steven Cheng
    Oct 6, 2008
  5. Norm
    Replies:
    3
    Views:
    2,681
Loading...

Share This Page