You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Lo...@lotus.com on 2001/03/02 16:39:53 UTC

Re: XalanJ200 Stylesheet requires attribute: version - updated DOM2DOM sample

Ah-ha! I had forgotten that you changed it to parse the xsl stylesheet into
a DOM.  In that case, the sample DOM2DOM.java is slightly misleading: when
parsing xsl documents, you have to call:
  documentBuilderFactory.setNamespaceAware(true);
before parsing any xsl documents -  which is not necessarily required to
parse the xml document you want to transform.  You should be able to add
this to your example before parsing the xsl doc and it should work.

I've updated xml-xalan\java\samples\DOM2DOM\DOM2DOM.java to parse both the
xsl and xml into DOMs, and added the setNamespaceAware call, so this should
be clearer in the future.

- Shane