• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Migrating from Oracle XML parser to JDK 1.4 XML parser

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

We are migrating some code that uses Oracle XML and XSL parsers to transform
an XML document into HTML. We are doing this because we found with some tests
that the jdk 1.4 parser is faster than Oracle's (like 50% faster in our
case). The XSL file that we need to parse includes a lot of other XSL files
wth the xsl:include directive. When migrating to the jdk 1.4 parser, the
parser only works if *all* XSL files are merged into one single file. If not,
this is the error we get when the parser tries to include the first XSL file:

XSL-1000: (Fatal Error) Error while parsing XSL file (<Line 4, Column 37>:
XSL-1002: (Error) Error while processing include XSL file (titdetter.xsl).).

The failing code is this one:


Where aXml is the XML file to transform and aXsl is the style sheet to use for the transformation. The error appears when runing the last line.

Any help would be appreciated.
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Juan Luis Baptiste:
Hi,
document = builder.parse(new FileInputStream("/xmltmp/" + aXml));
StreamSource styleSource = new StreamSource(new FileInputStream(Path +
"xsl/" + aXsl));
[/CODE]


Welcome to Javaranch Juan!
I guess the problem is because of the xml parser file-cursor looking at /xmltmp/ directory while xsl files were at xsl/ directory.
Guess you have to play around with directory hierarchy either in the java code levl or at the xsl:include level.
 
Juan Luis Baptiste
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tried that before, copied the xsl fils to the same dir of the xml and I still get the same error.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic