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

  • Thread starter Michael TEpperis
  • Start date
M

Michael TEpperis

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
 
M

Martin Honnen

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.
 
M

Michael TEpperis

Martin Honnen said:
Michael TEpperis wrote:



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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top