This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: javax.xml.transform throwing up data?
- From: "Scott Purcell" <spurcell at vertisinc dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 22 Aug 2002 15:15:09 -0500
- Subject: RE: [xsl] javax.xml.transform throwing up data?
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hello James,
I am trying to find out which XSLT processor I am using. I am having trouble figuring this out.
What are you looking for with this question?
he actual interesting element would have been xsl:output/
Thanks,
Scott
-----Original Message-----
From: James Fuller [mailto:james.fuller@o-idev.com]
Sent: Thursday, August 22, 2002 2:01 PM
To: xsl-list@lists.mulberrytech.com
Subject: RE: [xsl] javax.xml.transform throwing up data?
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Scott Purcell
>
> Hello
> I am transforming a xml file with a xsl file and I am getting
> some unwanted data. It is throwing into the HTML this line. It is
> messing me up downstream, and the developers want me to remove
> it. Does anyone here know about this, or where I may go to try
> and resolve this?
uhhh what XSLT processor u using ?
>
>
> <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
smells like saxon, there
here is a quote from Mr. Kay himself
-------------------------------------------------------------
I think you'll find that in the HTML specification, META is one of the
tags that is "self-closing", so this output is valid HTML. It's not
valid XML, and XML Spy is presumably complaining because it expects
valid XML. Saxon allows you to generate XHTML output (xsl:output
method="saxon:xhtml") which should solve the problem if that's what you
want to do.
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
-------------------------------------------------------------
or this
=== Cut ===
The saxon:omit-meta-tag attribute
This attribute may be set on the xsl:output element when method="html". The
normal action of the HTML output method, as specified in the XSLT standard,
is to generate a <META> tag immediately after the <HEAD> tag, containing
details of the media type and character encoding. Setting this attribute to
"yes" causes this output to be suppressed. Typical usage is
<xsl:output method="html" saxon:omit-meta-tag="yes">
=== Cut ===
google is amazing isnt it, just typed 'xslt saxon meta tag'..............
>
> transform code
>
> try {
> javax.xml.transform.Source xmlSource = new
> javax.xml.transform.stream.StreamSource(job.getXmlFile());
> javax.xml.transform.Source xsltSource = new
> javax.xml.transform.stream.StreamSource(job.getXslFile());
> javax.xml.transform.Result result = new
> javax.xml.transform.stream.StreamResult(baos);
> javax.xml.transform.TransformerFactory transFact =
> javax.xml.transform.TransformerFactory.newInstance();
> javax.xml.transform.Transformer trans =
> transFact.newTransformer(xsltSource);
nice java code.........but still doesnt help me figure out your problem
>
> // first two line os xsl file
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
>
and the rest of the XSLT stylesheet, this only tells me what I know
a) u are using xslt, and since XSLT 2.0 is wd i would expect 1.0
b) XSLT is xml
the actual interesting element would have been xsl:output/
gl, jim fuller
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list