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

XSLT template from XSLT + XML

Subject: XSLT template from XSLT + XML
From: Mulberry Technologies List Owner<xsl-list-owner@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 30 Sep 2002 19:55:46 -0400
autogenerate xslt
>From: "Michael Semcheski" <mhs@xxxxxxxxx>
>To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
>Subject: Re:  XSLT template from XSLT + XML
>Date: Mon, 30 Sep 2002 18:38:43 -0400
>
>> <a href="{@ref}"><xsl:value-of select="link"/></a>
>
>> in addition notice that the curly brackets will
>> output the value of whatever element, attribute, or var/param you supply.
>
>Thats a trick I did not know about before, thanks.
>
>> is it possible that instead of your styling that your data needs to go
>> through a few stages of transformation...always play around with your data
>> first, then style later.
>
>Well, in this case, it was necessary.  I needed an automated way to create
>applications built around xslt.  The xslt's were generally similar, but
>needed a few elements to be different, such as relative paths, etc.
>
>> there is no reason to autogenerate xslt code using xslt, xslt is
>xml....and
>> can be manipulated just as much as any xml file can be with XSLT...I
>suspect
>> the problem you maybe having is how to 'chain' these transforms together,
>in
>> other words how do you take the output of one transformation and supply it
>> as the input to another....you have a few options;
>
>> - control your processing with script, in the case of MSXML, u could use
>> javascript to chain a bunch of transforms together
>
>> - post an example snippet of xml / xsl maybe we can help
>
>Just for the sake of anyone who might have the same problem in the future,
>I'm including a chunk at the bottom.  Suffice it to say, Jeni's suggestion
>to use xsl:namespace made it very easy to create the templates and nodes
>that were required.  The only thing I was not sure about was what to put in
>the xsl:stylesheet line for "axsl" (the style-sheet prefix that became xsl)
>
>By the way, I'm surprised at how many auto-responders are on the mailing
>list.  If you're out on vacation, good for you.  I am not.
>
><?xml version="1.0"?>
><xsl:stylesheet version="1.0"
>    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>    xmlns:rs="urn:schemas-microsoft-com:rowset"
>    xmlns:z="#RowsetSchema"
>    xmlns:axsl="futurexsl">
>    <xsl:namespace-alias stylesheet-prefix="axsl" result-prefix="xsl" />
>    <xsl:template match="/compile-options">
>        <axsl:template match="/xml/rs:data/zbundle">
>            <tr>
>                <axsl:if test="z:row[@Suppress_Seperator='False']">
>                    <td>
>                        <xsl:attribute name="src"><xsl:value-of
>select="design/image-directory"/>images/background.jpg</xsl:attribute></img>
>                    </td>
>                </axsl:if>
>                <axsl:if test="z:row[@Suppress_Seperator='True']">
>                    <td valign="top" colspan="2"/>
>                </axsl:if>
>            </tr>
>            <tr>
>                <axsl:if
>test="not(boolean(z:row[@QNumber]))"><td>&#160;</td></axsl:if>
>                <axsl:if
>test="boolean(z:row[@QNumber])"><td><img><axsl:attribute
>name="src"><xsl:value-of select="design/image-directory"/><axsl:value-of
>select="z:row/@QNumber"/>.jpg</axsl:attribute></img></td></axsl:if>
>                <td>
>                    <table>
>                        <axsl:apply-templates select="z:row"/>
>                    </table>
>                </td>
>            </tr>
>        </axsl:template>
>    </xsl:template>
></xsl:stylesheet>



 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.