I am trying to create an XMLFilter that is used as the reader for a
SAXSource s, that is subsequently passed as the argument to the
TransformerFactory.newTransformer(s)

So, my startDocument starts off like

 public void startDocument() throws SAXException {
  super.startDocument();

  AttributesImpl atts = new AttributesImpl();
  atts.addAttribute("http://www.w3.org/1999/XSL/Transform";, "version",
"xsl:version", "number", "1.0");
  super.startElement("http://www.w3.org/1999/XSL/Transform";, "transform",
"xsl:transform", atts);


however, doing this xalan yells at me:

javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerException:
javax.xml.transform.TransformerException: "xsl:version" attribute is not
allowed on the xsl:transform element!

so i f i comment out the addAttribute line, the error changes to be

javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerException:
javax.xml.transform.TransformerException: xsl:transform requires attribute:
version

----

am i getting the type wrong? or perhaps my use of qName, or what is going
on?

Reply via email to