dleslie 01/09/07 07:56:00
Modified: java/xdocs/sources/xalan faq.xml
Log:
Added faq on the "Namespace not supported by SAXParser"
exception.
Revision Changes Path
1.11 +31 -2 xml-xalan/java/xdocs/sources/xalan/faq.xml
Index: faq.xml
===================================================================
RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/faq.xml,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- faq.xml 2001/08/13 14:56:31 1.10
+++ faq.xml 2001/09/07 14:56:00 1.11
@@ -43,7 +43,7 @@
<li>You can also set up a series of parent-child relationships between
an XMLReader and one or more XMLFilters.</li>
</ul>
<p>For the details and links to examples, see <link
idref="usagepatterns" anchor="outasin">Using transformation output as input for
- another transformation</link>.</p></a>
+ another transformation</link>.<anchor name="jdk13"/></p></a>
</faq>
<faq title="Issues running Xalan on JDK 1.3">
@@ -110,7 +110,7 @@
API)</link>.</li>
</ol>
<p>For more information, see <link idref="getstarted"
anchor="classpath">Setting up the system classpath</link>.</p>
- <p><em>Using the EnvironmentCheck utility:</em> To help diagnose
classpath problems, try running Xalan's environment checking utility, checked
in at
+ <p><anchor name="environmentcheck"/><em>Using the EnvironmentCheck
utility:</em> To help diagnose classpath problems, try running Xalan's
environment checking utility, checked in at
xml-xalan/java/src/org/apache/xalan/xslt/EnvironmentCheck.</p>
<p>You can run this utility from the command line as follows:</p>
<p><code>java org.apache.xalan.xslt.EnvironmentCheck [-out
outFile]</code></p>
@@ -191,4 +191,33 @@
<p>Thanks to Gunnlauger Thor Briem ([EMAIL PROTECTED]) for providing
this information. </p>
</a>
</faq>
+ <faq title="Namespace not supported by SAXParser">
+ <q>Why am I getting a "Namespace not supported by SAXParser exception?</q>
+ <a>
+ <p>We have seen this probem arise for two quite different reasons:</p>
+ <ul>
+ <li>SAX1 interfaces are on your classpath in front of the SAX2 interfaces
provided with your XML
+ parser.<br/><br/>
+ or<br/><br/></li>
+ <li>The parser you are using to process a stylesheet Source and generate a
Transformer does not have the
+ namespaceAware property set to true.</li>
+ </ul>
+ <p><em>SAX1 on the classpath</em></p>
+ <p>SAX1 should not be on your classpath. The SAX1 interfaces and
implementations of the SAX1 SAXPparser
+ are not namespace aware.</p>
+ <p>To help diagnose your classpath, you can use the <link
anchor="environmentcheck">EnvironmentCheck
+ utility</link>. If you are running under JDK 1.3, see <link
anchor="jdk13">Issues running Xalan on JDK
+ 1.3</link>. If you are running a servlet, make sure the servlet engine is
not placing SAX1 on the
+ classpath.</p>
+ <p><em>Setting the parser to be namespace aware</em></p>
+ <p>When you create a Transformer, you must use a namespace-aware parser to
parse the stylesheet.</p>
+ <p>If you use a TransformerFactory to process a stylesheet Source and
generate a Transformer, the
+ TransformerFactory instructs the SAXParserFactory to set the parser's
namespaceAware property to true.
+ But if you call the parser directly, you may need to set the
namespaceAware property yourself. For
+ example:</p>
+<source>javax.xml.parsers.SAXParserFactory spFactory =
+ javax.xml.parsers.SAXParserFactory.newInstance();
+spFactory.setNamespaceAware(true);</source>
+</a>
+</faq>
</faqs>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]