You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Voytenko, Dimitry" <DV...@SECTORBASE.COM> on 2001/03/01 00:38:10 UTC
RE: disable-escaping seems not to work
Hi Rudi,
I'm not sure I understood what you want to do. But "disable-output-escaping"
doesn't control whether tags are output or not. It just outputs string value
of object - result of select expression. If this is node-set it will output
concatenation of all text nodes inside of first node in node-set. If you
need all tags inside use <xsl:copy-of select=""/> construction
Thanks,
Dmitry
-----Original Message-----
From: Rudi Bruchez [mailto:RudiB@cneteu.com]
Sent: Tuesday, February 27, 2001 05:46
To: 'xalan-dev@xml.apache.org'
Subject: disable-escaping seems not to work
Hello all,
Can someone just give me a hand ?
I'm using that xslt, with Xalan 2 (java)
on the line :
<xsl:value-of select="StoryBody" disable-output-escaping="yes"/>
the content of StoryBody is a part of HTML. Even with the
disable-output-escaping="yes", all the tag are not copied (they are
deleted...). Someone has an idea why it happens ?
thanks a lot,
rudi
-------------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:html="http://www.w3.org/Profiles/XHTML-transitional"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
extension-element-prefixes="redirect">
<!-- but why !!! -->
<xsl:attribute-set name="html:a" use-attribute-sets="href"/>
<lxslt:component prefix="redirect" elements="write open close" functions="">
<lxslt:script lang="javaclass" src="org.apache.xalan.lib.Redirect"/>
</lxslt:component>
<xsl:template match="Article">
<xsl:variable name="filename" select="concat('articles\',
ID,'.xml')"/> <!-- 'articles\', -->
<xsl:variable name="AuthEmail" select="Author_Email"/>
<redirect:write select="$filename" xml:space="preserve">
<Article
xmlns:HTML='http://www.w3.org/Profiles/XHTML-transitional'
stylesheet='../article.xsl'>
<PublicHeader ptype='p'>
<xsl:value-of select="Headline"/>
</PublicHeader>
<Lead ptype='p'><TextHightLight1>
<xsl:value-of select="Abstract"/>
</TextHightLight1></Lead>
<NormalText ptype="p">
<TextAuthor>
<html:a
href="{concat('mailto:',Author_Email)}">
<xsl:value-of
select="concat(Author_Firstname, ' ', Author_Lastname)"/>
</html:a>
</TextAuthor>
</NormalText>
<NormalText ptype="p">
<HTML:BR />
<PubDate><xsl:value-of
select="TimeStamp"/></PubDate>
</NormalText>
<NormalText ptype="p">
<xsl:value-of select="StoryBody"
disable-output-escaping="yes"/>
</NormalText>
</Article>
</redirect:write>
<!-- write the ID in outfile, for matching against already
present data -->
<xsl:value-of select="ID"/>
</xsl:template>
</xsl:stylesheet>