[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: parsing xsl file in java

Subject: RE: parsing xsl file in java
From: Jarno.Elovirta@xxxxxxxxx
Date: Wed, 25 Feb 2004 12:54:28 +0200
java parsing file
Hi,

> Can any one please help me by guiding how can I parse an xsl 
> file through
> Java Servlets and replace a node's attribute in it.

I don't really understand what you mean when you say you want to "parse an xsl file through Java Servlets", but see the JAXP API how to make XSLT transformations in a Java program, and the XSLT for replacing an attribute is something in the lines of

  <xsl:template match="foo/@bar">
    <xsl:attribute name="baz">qux</xsl:attribute>
  </xsl:template>
  <xsl:template match="@* | node()">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
  </xsl:template>

Cheers,

Jarno - This Morn' Omina: The Immutable sphere

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.