Hi all, I'm new to Xalan and still learning XSLT. I'm having a problem with the xalan:nodeset() function. This contrived stylesheet is an example:
<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fd="http://www.example.com/fd" exclude-result-prefixes="xalan" > <xsl:variable name="rtf"> <fd:docelem> <fd:elem1> <fd:elem1a fd:anatt="xyz">ELEMENT1A</fd:elem1a> <fd:elem1b>,ELEMENT1B</fd:elem1b> </fd:elem1> <fd:elem2> <fd:elem2a>ELEMENT2A</fd:elem2a> </fd:elem2> </fd:docelem> </xsl:variable> <xsl:template match="/"> <out> <xsl:message terminate="yes"> <xsl:value-of select="xalan:nodeset($rtf)/fd:docelem/fd:elem1/fd:elem1a/@fd:anatt" /> </xsl:message> <xsl:for-each select="xalan:nodeset($rtf)/fd:docelem//*"> <xsl:value-of select="name(.)"/><xsl:text>,</xsl:text> </xsl:for-each> </out> </xsl:template> </xsl:stylesheet> The source tree for this transform is irrelevant. When I execute the transform: xalan -o willbeempty.xml dummy.xml theabovestylesheet.xsl the value of fd:anatt is not printed. If I remove the namespace prefix from the anatt attribute in the result tree fragment and in the call to value-of, the value of anatt is printed. This effect is seen with attributes, but not elements. Can anyone tell me why this is happening? Is it inappropriate to use qualified names for attributes in RTFs. Thanks, Regards, Alex Hogg Computational Toxicology Section Health Sciences Group Health and Safety Laboratory DD: (0114) 289 2606 Fax: (0114) 289 2850 [EMAIL PROTECTED]
