[jdom-interest] Re: How do I set Features of XMLParser that Xalan is using
Hani Elabed
hani at mail.elabed.net
Thu Aug 17 13:21:41 PDT 2000
Oh, I guess to be 100% complete,
here is the XML file,
http://ccap.courts.state.wi.us/FOtesting/judgmentOfConviction_40_99CF000011.xml
the DTD File,
http://ccap.courts.state.wi.us/FOtesting/judgmentOfConviction.dtd
and the XSL file for doing transformation to an *.fo file
http://ccap.courts.state.wi.us/FOtesting/judgmentOfConviction.xsl
thanks in advance for your time.
Hani
Hani Elabed wrote:
> Greetings,
> This one has been puzzling me !!
>
> I have an XML file that is "Well Formed"
> and "Valid" against a DTD
> file.
>
> When I test this XML file with
> my XMLParser ( Xerces 1.1.2)
> and I set the following features.
>
> // Turn on validation
> parser.setFeature("http://xml.org/sax/features/validation",
> true);
>
> // Turn off namespace awareness
> parser.setFeature("http://xml.org/sax/features/namespaces",
> false);
> // This was suggested by Brett McLaughlin in his "Java and XML"
> // book by O'reilly, page 131 to allow Validation using SAX2.0
> // without Parse Errors.
>
> The XML file parses Fine. Now, I need to
> Transform the XML file(above) using an XSL
> file to produce an Formatted Object(FO) file.
> before FOP switched to SAX2.0, I had no problem
> with this, now ....problems!!
>
> My problem is how to tell the XSLProcessor
> to set the above features of the XMLParser it is
> using so as Validation against the DTD can
> continue working. This is how I use the XSLProcessor.
>
> // Use XSLTProcessorFactory to instantiate an XSLTProcessor.
> XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
>
> // Create the 3 objects the XSLTProcessor needs to perform the
> transformation.
> XSLTInputSource xmlSource = new XSLTInputSource (args[0]);
> XSLTInputSource xslSheet = new XSLTInputSource (args[1]);
> // fo file below..
> XSLTResultTarget xmlResult = new XSLTResultTarget (args[2]);
>
> I can't seem to locate a way to do that... Any ideas.
> Thanks in advance.
>
> Hani
>
> This email is being posted to
> FO List
> Xalan List
> JDOM List
More information about the jdom-interest
mailing list