Yes, exactly that was my misunderstanding of the first post (hate mondays ;))
<!DOCTYPE xsl:stylesheet [
<!ENTITY content "<xsl:value-of select='.'/>" >
]>
should give you the expected result. (tested with Saxon 8.3)
XML source file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<root>Test</root>
XSLT:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY content "<xsl:value-of select='.'/>" >
]>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="root">
<test>
&content;
</test>
</xsl:template>
</xsl:stylesheet>
Result:
<?xml version="1.0" encoding="UTF-8"?>
<test>Test</test>
wbr,
Roman
_______________________________________
Roman Huditsch
IT and Electronic Publishing
LexisNexis ARD Orac
Marxergasse 25
1030 Vienna
Austria
ph: +43-1-534 52-1514
f: +43-1-534 52-140
e-mail roman.huditsch@xxxxxxxxxxxxx
www.lexisnexis.at
> -----Urspr|ngliche Nachricht-----
> Von: Florent Georges [mailto:darkman_spam@xxxxxxxx]
> Gesendet: Montag, 9. Januar 2006 14:03
> An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Betreff: RE: AW: ENTITY declaration
>
> Huditsch Roman wrote:
>
> > <!DOCTYPE xsl:stylesheet [
> > <!ENTITY content "<xsl:value-of select="."/>"> ]>
>
> But the Entity Replacement Text will be interpreted as a
> textual value, not as markup, isn't it?
>
> --drkm
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ______________________________________________________________
> _____________
> Nouveau : tiliphonez moins cher avec Yahoo! Messenger !
> Dicouvez les tarifs exceptionnels pour appeler la France et
> l'international.
> Tilichargez sur http://fr.messenger.yahoo.com
|