xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <j3322...@yahoo.de>
Subject Re: wrong namespace??
Date Tue, 04 Jun 2002 18:59:19 GMT
Esteban Gonzalez wrote:
 > I´m running out of ideas.

For a start, if you have still stuff after this:
 >>> trans.transform( new DOMSource( voucher ), new
 >>>    SAXResult( driver.getContentHandler() ));

delete it. Especially delete the call to render().
It is possible that the error is generated by the
second attempt at rendering the DOM document. The
trans.transform() already renders the document.

> <?xml version="1.0" encoding="UTF-8"?>
> <?xml-stylesheet type="text/xsl"
> href="c:\enhydra\xml1\assistcard\com\icard\xml\voucher.xsl"?>

There is no need for a stylesheet to link to a
stylesheet (or itself). Delete this.
In particular:
 > <?xml-stylesheet type="text/xsl"
there is no such MIME type, if you use such a PI to
link a stylesheet to an XML file (for client side
processing), use text/xml.

If all else fails, use a stylesheet to extract the
version of the style sheet, like

--- dump.xsl ---
<xsl:stylesheet version="1.0"
   <xsl:template match="/">
     <xsl:value-of select="*/@version"/>

    Document xsl = xml.getXSL();
    Transformer trans = TransformerFactory.newInstance()
      .newTransformer(new StreamSource("dump.xsl"));
    trans.transform( new DOMSource(xsl),
      new StreamResult("dump.result"));
The result should be something like
  <?xml version="1.0" encoding="utf-8"?>1.0


View raw message