Have all people in the list an happy new year...
and sorry to use HTML in the mail
I've a problem using java extension in
xalan.
an extension java call give me 2 different objects,
depending of the call in the XSL transform.
considering the java extension call
public String
initTables(org.apache.xalan.extensions.XSLProcessorContext
context,
org.w3c.dom.Element elem1)
org.w3c.dom.Element elem1)
{org.w3c.dom.Element elemC=(
org.w3c.dom.Element) context.getContextNode();
...
}
and the transformation given in the
listing above.
It's work well and the object in elemC is an
org.apache.xerces.dom.DefferedElementNSimpl object
(as expected)
but if I change the bolded line by the line in
comment in the listing ( what I need to do) , the returned object is
an
org.apache.dtm.ref.DTMNodeProxy object
and the rest of the function don't
work.
It's a cast problem or a bug from
xalan?
how to cast it properly to have a Element object ?
Thank's for answer...
Mr Rémi
Clavier
Expert Méthodes et
Outils
France
Telecom R&D/RTA/D2M
2, Avenue Pierre Marzin
22307
Lannion
tel : +33 2 96 05 22 20
fax:
+33 2 96 05 22 20
e_mail : [EMAIL PROTECTED]
<?xml version="1.0"
encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:exc="MyExcWriter"
xmlns:xalan="http://xml.apache.org/xalan"
extension-element-prefixes="exc xalan"
version="1.0">
<xsl:output method="xml" encoding ="ISO-8859-1" />
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:exc="MyExcWriter"
xmlns:xalan="http://xml.apache.org/xalan"
extension-element-prefixes="exc xalan"
version="1.0">
<xsl:output method="xml" encoding ="ISO-8859-1" />
<lxslt:component
prefix="exc"
elements=" initTables"
functions=" ">
elements=" initTables"
functions=" ">
<lxslt:script lang="javaclass" src=""/>
</lxslt:component>
</lxslt:component>
<xsl:template
match="/doc">
<test>
<xsl:variable name="mydoc">
<xsl:copy-of select="." />
</xsl:variable>
<test>
<xsl:variable name="mydoc">
<xsl:copy-of select="." />
</xsl:variable>
<xsl:copy-of
select="$mydoc" />
<!--<xsl:apply-templates select="xalan:nodeset($mydoc)/doc" mode="test" />-->
<xsl:apply-templates select="/doc" mode="test" />
</test>
</xsl:template>
<!--<xsl:apply-templates select="xalan:nodeset($mydoc)/doc" mode="test" />-->
<xsl:apply-templates select="/doc" mode="test" />
</test>
</xsl:template>
<xsl:template match="/doc" mode="test">
<exc:initTables name="index" />
</xsl:template>
</xsl:stylesheet>
