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

Re: Filtering on element name e.g. Author*

Subject: Re: Filtering on element name e.g. Author*
From: "Bill Rishel" <illusyn@xxxxxxxxxx>
Date: Tue, 22 Feb 2000 22:37:58 -0800
bill rishel
> Doesn't work for me.
> 
> This will work with ie5 won't it and it does run of the example.
> 

I did it with xt:
XML:
<?xml version="1.0"?>

<top>
<subscriber_id>nick</subscriber_id>
<portfolio1>fun</portfolio1>
<portfolio2>serious</portfolio2>
</top>

XSL:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:xt="http://www.jclark.com/xt"
                extension-element-prefixes="xt">

<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:strip-space elements="*"/>

  <xsl:template match="/">
      <xsl:apply-templates />
  </xsl:template>
  
  <xsl:template match="top">
    <xsl:apply-templates select="*[substring(name(),1,9)='portfolio']"/>
  </xsl:template>
   
  <xsl:template match="top/*"> 
 <xsl:text>
 </xsl:text>
 <xsl:value-of select="name()"/>
  </xsl:template>

</xsl:stylesheet>

OUTPUT:

        portfolio1
        portfolio 


 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.