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

Re: XML to XML Transformation

Subject: Re: XML to XML Transformation
From: "Joerg Heinicke" <joerg.heinicke@xxxxxx>
Date: Wed, 12 Dec 2001 23:01:59 +0100
Re:  XML to XML Transformation
What have you done until now? HTML-transformation? The difference shouldn't
be so big. The only thing that changes, is <xsl:output method="html"> ->
method="xml" (default) and maybe it bit more logic.

An example for your stylesheet:

<xsl:stylesheet version="1.0"
xmlns:xsl=http://www.w3.org/1999/XSL/Transform>
    <xsl:template match="*">
        <xsl:if test="@flag='yes'">
            <xsl:copy>
                <xsl:apply-templates select="@*|*|text()"/>
            </xsl:copy>
        </xsl:if>
    </xsl:template>
    <xsl:template match="@*|text()">
        <xsl:copy/>
    </xsl:template>
</xsl:stylesheet>

Regards,

Joerg

----- Original Message -----
From: "Magick, Brian" <Brian.Magick@xxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, December 12, 2001 9:18 PM
Subject:  XML to XML Transformation


> I'm looking to write a style sheet that will perform an XML to XML
> transformation.  My requirements are not too complex and I don't think
> this should be very difficult.  I simply want to take an XML document
> where an element has an attribute that acts as a yes/no flag.  I would
> like to filter only the "yes" flags and render a new XML page with only
> the elements that contain the "yes" flag in the attribute value.
>
> As I have never done an XML to XML transformation before I hope someone
> can point me towards some good web resources.
>
>
> Thanks!
>
> Brian Magick


 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.