xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulus Oliver" <oliver.pau...@siemens.com>
Subject RE: Xalan-J, Xerces-J XInclude question
Date Thu, 16 Feb 2006 06:40:27 GMT
Hello Peter,

thank you for your help (so far). I have seen in the Xalan java code
that there is no option to give him "passthrough" parameters for the XML
parser (Xerces in this case). I think it could be useful for the users -
what do you think?

Another problem I have struggled with was that with java 1.4.x a xalan
version was included in the java runtime. I have seen that I have to put
the new version into the endorsed dir or give the option
java.endorsed.dirs on commandline. With the new xalan version in place I
had some difference in the EXSLT usage and namespace behaviour. This is
now fixed - it was a failure in my XSL files.

I have made a test with some java code to call Xalan-J. Here is my code

	DocumentBuilderFactory dbfactory =
//dbfactory.setFeature("http://apache.org/xml/features/xinclude", true);
-uris", false);
nguage", false);
	DocumentBuilder parser = dbfactory.newDocumentBuilder();
	Document document = parser.parse(new File("input.xml"));
	DOMSource xmlSource = new DOMSource(document);
	TransformerFactory tFactory = TransformerFactory.newInstance();
	Transformer transformer = tFactory.newTransformer(new
	transformer.transform(xmlSource, new StreamResult(new

This code transforms the xml with the xsl file but does not recognize
the fixup-base-uris option set. I get the xml:base attributes in the
output file. What is wrong with this code?

Is there any basic tutorial or wiki how to use xalan and xerces from
java code?

Oliver Paulus

-----Original Message-----
From: Peter McCracken [mailto:peterjm@ca.ibm.com] 
Sent: Mittwoch, 15. Februar 2006 22:14
To: general@xml.apache.org
Subject: RE: Xalan-J, Xerces-J XInclude question

"Paulus Oliver" <oliver.paulus@siemens.com> wrote on 02/14/2006 11:03:39


> Is there a possibility to set this feature in the commandline mode? I
> not use any java code (until now). My current call looks like this:
> java -jar
> parsers.XIncludeParserConfiguration
> parser\xalan-j_2_7_0-bin\xalan-j_2_7_0\xalan.jar -IN
> -XSL xsl\main.xsl -OUT target\result.xml 

Hi Oliver,

Unfortunately, there's no way to pass feature values to the XML parser 
using the command line of Xalan's Process program.  I think you'll need
write a small Java program to get the functionality you want.

Peter McCracken
XML Parser Development
IBM Toronto Lab
Email: peterjm@ca.ibm.com

To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

View raw message