how to create a entity reference in an xml output from xslt?

Discussion in 'XML' started by Michael TEpperis, Aug 5, 2004.

  1. hello

    my xml result should contain the following two xml parts:

    1)
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE AML SYSTEM "xxx.dtd" [
    <!ENTITY LocaleId.DEde "1031">
    <!ENTITY Codepage.DEde "1252">
    ]>

    2)
    <Language LocaleId="&LocaleId.DEde;" Codepage="&Codepage.DEde;">


    the first I create with:

    <xsl:text disable-output-escaping = "yes"><![CDATA[
    <!DOCTYPE AML SYSTEM "xxx.dtd" [
    <!ENTITY LocaleId.DEde "1031">
    <!ENTITY Codepage.DEde "1252">
    ]>
    ]]>
    </xsl:text>

    but I did not succeed to create the second. using &amp; gives me
    not the wanted result.

    tia
    Michael Tepperis-von der Ohe
    Michael TEpperis, Aug 5, 2004
    #1
    1. Advertising

  2. Michael TEpperis wrote:


    > my xml result should contain the following two xml parts:
    >
    > 1)
    > <?xml version="1.0" encoding="UTF-8"?>
    > <!DOCTYPE AML SYSTEM "xxx.dtd" [
    > <!ENTITY LocaleId.DEde "1031">
    > <!ENTITY Codepage.DEde "1252">
    > ]>
    >
    > 2)
    > <Language LocaleId="&LocaleId.DEde;" Codepage="&Codepage.DEde;">
    >
    >
    > the first I create with:
    >
    > <xsl:text disable-output-escaping = "yes"><![CDATA[
    > <!DOCTYPE AML SYSTEM "xxx.dtd" [
    > <!ENTITY LocaleId.DEde "1031">
    > <!ENTITY Codepage.DEde "1252">
    > ]>
    > ]]>
    > </xsl:text>
    >
    > but I did not succeed to create the second. using &amp; gives me
    > not the wanted result.


    According to http://www.dpawson.co.uk/xsl/sect2/N2281.html#d3414e220 you
    should be able to use
    <xsl:text disable-output-escaping="yes">&LocaleId.DEde;</xsl:text>
    where the usual warnings that disable-output-escaping doesn't have to be
    implemented by an XSLT processor should be considered.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Aug 5, 2004
    #2
    1. Advertising

  3. Martin Honnen <> wrote in message news:<>...
    > Michael TEpperis wrote:
    >
    >
    > > my xml result should contain the following two xml parts:
    > >
    > > but I did not succeed to create the second. using &amp; gives me
    > > not the wanted result.

    >
    > According to http://www.dpawson.co.uk/xsl/sect2/N2281.html#d3414e220 you
    > should be able to use
    > <xsl:text disable-output-escaping="yes">&LocaleId.DEde;</xsl:text>
    > where the usual warnings that disable-output-escaping doesn't have to be
    > implemented by an XSLT processor should be considered.


    thanks for the info, meanwhile I found a good article about my problem:

    http://www.xml.com/lpt/a/2001/03/14/trxml10.html

    there I found the same solution.

    greetings
    Michael Tepperis-von der Ohe
    Michael TEpperis, Aug 6, 2004
    #3
    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. Joris Gillis
    Replies:
    3
    Views:
    487
    Joris Gillis
    Oct 11, 2004
  2. Samuel van Laere

    Entity Name or Entity Number?

    Samuel van Laere, Feb 24, 2007, in forum: HTML
    Replies:
    4
    Views:
    1,617
    Jukka K. Korpela
    Feb 24, 2007
  3. markla
    Replies:
    1
    Views:
    540
    Steven Cheng
    Oct 6, 2008
  4. Norm
    Replies:
    3
    Views:
    2,700
  5. ThatsIT.net.au

    Entity, problem with entity key

    ThatsIT.net.au, Sep 6, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    1,190
    ThatsIT.net.au
    Sep 7, 2009
Loading...

Share This Page