473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

XALAN-XERCES/ loading of external DTD

Hi,

I have the problem switching off the "loading of external DTD" feature while
transforming xml/xslt with XALAN.
The used xml-parser is XERCES.
I know how to switch off this feature when only parsing XML (SAX-API)
(
saxParser.setFeature("http://apache.org/xml/features/nonvalidating/load-exte
rnal-dtd", false) )
and I would like to know how to switch off this when using XALAN/XERCES in
order to XSLT transform.

Here is my code snippet:
-----------
javax.xml.transform.Source xmlSource = new
javax.xml.transform.stream.StreamSource(new StringReader(xml));
javax.xml.transform.stream.StreamSource xsltSource = new
javax.xml.transform.stream.StreamSource(xsltFileNa me);
StringWriter resultText = new StringWriter();
javax.xml.transform.Result xmlResultStream = new
javax.xml.transform.stream.StreamResult(resultText );
javax.xml.transform.TransformerFactory transFact =
javax.xml.transform.TransformerFactory.newInstance ();
Transformer trans = transFact.newTransformer(xsltSource);
trans.transform(xmlSource, xmlResultStream);
-------------

Thanks for any hint.

Michael Alers


Jul 17 '05 #1
0 2183

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: al dav | last post by:
Hi all ok i am not a java programmer I am a sys-admin, my users want xalan and have already got j2sdk_1.4.2 so i have downloaded it and set the CLASS_PATH export...
0
by: Jeroen N. Witmond | last post by:
Does anybody have ant experience with xalan http://xml.apache.org/xalan-c/overview.html on RedHat 9? Do you use the binary distribution for RH7.2 or did you build xalan from its source? Or did you...
0
by: Guillaume Jeudy | last post by:
Hi, I'm trying to serialize a DOM constructed from the following URL which is subject to change very frequently: ...
1
by: Fisch von Gestern | last post by:
I have tried to run the extension function/element examples provided with the Xalan-J download. I believe that my classpath is correct, and that my versions are up-to-date. However, I can't get...
5
by: John | last post by:
I'm trying to generate HTML using a SAX TransformHandler. The problem I'm having is related to the xalan transformer using the shorthand notation when it writes out an empty textarea tag. My...
7
by: RC | last post by:
First, let me say I couldn't find a group discuss XML/XSLT. So I only choose the closest groups to post this message. Here is part of my *.xsl file <xsl:stylesheet...
2
by: henribastien | last post by:
I'm trying to return an array from a xalan extension but so far I have made no progress. What I would like to return is something like that <entry id="red">201</entry> <entry...
1
by: redcic | last post by:
Hi, Does anyone know which version of Java Virtual Machine I need to run Xalan 2.7.0. I've got difficulties with Java 1.1.8. Thanks, Cédric
3
by: Anonymous | last post by:
Has anyone managed to build Xalan v 1.10 using VS 2005? If the VS 7 project is converted to VS 8.0., it generates *TONS* of errors - anyone managed to build this yet?
3
by: awebguynow | last post by:
What are the rules for classpath, when using Xalan on the command line? I'm using java J2SE 1.6.0 but haven't used Xalan for a while and ran into all kinds of troubles today. Of course, I went...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.