Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] XSLTransform

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Jacobs, Robert A." <ra.jacobs AT ngc.com>
  • To: "XOM (E-mail)" <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] XSLTransform
  • Date: Wed, 30 Mar 2005 17:00:42 -0600

XOM'mers,

I'm trying to troubleshoot an XSLTransform problem I'm having;
I'm not really certain where to continue. I am trying to run
a transform on a XOM document that is built from a base document
and XIncluded "text" fragments (parse="text").

This is what I have done so far:

I've got my XML document loaded into a XOM document and validated.
As I mentioned, the original (base) document does use XInclude and
I was able to get it loaded up through the resolver[1]. I've output
the contents of the XOM document via toXML() to verify that the
Document load was successful.

I've got my XSL stylesheet loaded into an XSLTransform. I ran into
a problem validating the XSL stylesheet because the Document builder did
not like the xsl namespace association in the first 3 lines of the
stylesheet[2]. I turned off validation, got it loaded, and output the
Stylesheet document same as I did the main XML document.

I am providing XSL parameters to the transformer via the setParameter()
method to direct how the transform should proceed.

I am able to get output via command-line use of Saxon
(com.icl.saxon.Stylesheet) but I do have to edit my XML file a bit
to get it to work (drop the namespace prefixes and cut out the
XIncluded files). I'm guessing this is because of the Saxon version?

I get nothing back from the XOM transform(document) call. No nodes
are returned.

Any troubleshooting suggestions greatly appreciated.

=========================================
Development Environment
=========================================

My application is part of a Struts web-application (1.2.6) running
under JBoss (3.2.3) if that provides any clues. JDK = 1.4.2_06.

I'm wondering if I'm running into a parser conflict or something. I
have tried switching to JBoss 4.0.1sp1 and JDK 1.5.0_01 but the
struts <html:base> tag causes a compile-error (must be using a Collection
and does not specify its type via generics - I'm sure its pre-1.5)
so I'm pretty much stuck where I am. I do not believe I JAXP 1.3
is an option as I know my customer will not allow me to load libraries
outside of my own web-application context.

-----------------------------------------

[1] I had to turn off validation features, load the document via
a non-validating parser, resolve the document via the XInclude
calls and then send the document back through a validating
parser by way of document.toXML().

[2]<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

Robert A. Jacobs, MSCIS
SPATE/JTT Senior Software Developer
Northrop Grumman Defense Mission Systems
(402) 293-3943 * ra.jacobs AT ngc.com




Archive powered by MHonArc 2.6.24.

Top of Page