|
Subject: Re: [xsl] Transforming using DOMSource and DOMResult From: Tim Meals <tmeals@xxxxxxxxx> Date: Fri, 8 Aug 2003 14:05:13 -0700 |
John --
Have you tried transforming the XSL (A.xsl) file from the command line?
Also, if it's not too much trouble, maybe you could post a sample for
both A.xsl and B.xsl, as well as the expected result vs. the actual
result.
Tim
On Fri, Aug 08, 2003 at 04:22:49PM -0400, John.Coffie@xxxxxxxxxx wrote:
> I apply a stylesheet (lets call it A.xsl) to an xml documet generating
> another stylesheet (called B.xsl) in memory. Everything appears to work
> fine however on closer inspection it is clear that the output B.xsl is
> wrong. A.xsl uses a series of conditional statements to include other
> stylesheets in B.xsl. All actions wrapped by conditional statements (this
> includes xsl:include statements and other instructions) are ignored, while
> all others are executed correctly. Below is the snipet of my transformation
> code. I will be glad to forward my .xml and .xsl documents if anyone is
> interested in looking at this issue. Any help will be appreciated.
>
>
> TransformerFactory tFactory = TransformerFactory.newInstance();
>
> if (tFactory.getFeature(DOMSource.FEATURE) &&
> tFactory.getFeature(DOMResult.FEATURE)){
>
> DocumentBuilderFactory dFactory =
> DocumentBuilderFactory.newInstance();
>
> dFactory.setNamespaceAware(true);
>
> DocumentBuilder dBuilder = dFactory.newDocumentBuilder();
>
> Document xslDocument = dBuilder.parse(xslFile);
>
> DOMSource xslDomSource = new DOMSource(xslDocument);
>
> transformer = tFactory.newTransformer(xslDomSource);
>
> DOMResult xslDomResult = new DOMResult();
>
> transformer.transform(new DOMSource(xmlDocument), xslDomResult);
>
>
>
>
>
>
> CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
> for the sole use of the intended recipient(s) and may contain confidential
> and privileged information or otherwise protected by law. Any unauthorized
> review, use, disclosure or distribution is prohibited. If you are not the
> intended recipient, please contact the sender by reply e-mail and destroy
> all copies of the original message.
>
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
--
e-mail: tmeals@xxxxxxxxx
"Recommend to your children virtue; that alone can make them
happy, not gold."
-- Ludwig van Beethoven
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Transforming using DOMSource , John . Coffie | Thread | RE: [xsl] Transforming using DOMSou, Michael Kay |
| RE: [xsl] SQL SELECT statement in X, Greg Johnson | Date | RE: [xsl] XSLT document() function!, Américo Albuquerque |
| Month |