namespace problem in jdk 1.4.2

Hi,

I'm trying to transform a xml file using default transformation from JDK 1.4.2 (requirement). I have need to use exslt node-set() function in a template because i have to sort the nodes. my stylesheet is now defined as this:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:xalan="http://xml.apache.org/xalan" extension-element-prefixes="xalan" version="1.0">

When I start transformation I get a SaxException thrown:

org.xml.sax.SAXException: Can not resolve namespace prefix: xalan

at org.apache.xalan.processor.XSLTAttributeDef.processPREFIX_URLLIST(XSLTAttributeDef.java:1279)

at org.apache.xalan.processor.XSLTAttributeDef.processValue(XSLTAttributeDef.java:1432)

at org.apache.xalan.processor.XSLTAttributeDef.setAttrValue(XSLTAttributeDef.java:1589)

at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:381)

at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:312)

at org.apache.xalan.processor.ProcessorStylesheetElement.startElement(ProcessorStylesheetElement.java:139)

at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:668)

at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1672)

at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)

at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)

at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)

at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:972)

at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:788)

...

What could be done to fix this?

Kind regards,

Kai

Message was edited by:

Hackemesser

[2017 byte] By [Hackemessera] at [2007-11-27 3:41:07]
# 1

My XSLT reference says this:

"The scope of the extension-element-prefixes attribute is the stylesheet module, not the full stylesheet tree constructed by applying <xsl:include> and <xsl:import> elements."

So you are importing some stylesheets from exslt? That prefix doesn't apply to them, is what that sentence says.

DrClapa at 2007-7-12 8:44:37 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
No, I don't. just the definition of the namespace and it's registration as extension prefix. Later in the stylesheet I wanted to use the node-set() function.
Hackemessera at 2007-7-12 8:44:37 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...