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

node() implementation

Subject: node() implementation
From: Jarkko.Moilanen@xxxxxx
Date: Wed, 11 Jun 2003 17:29:36 +0300
 node() implementation
I was given this question: 
"I have a difficulty to find  an example of  stylesheet which strips all xml
tags leaving only text and attributes ( I need it for indexing ) .
It should work with IE.  Some examples I picked up from Internet just upset IE." 

So what I suggested was:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

 <xsl:output method="text"/>

<xsl:template match="node()">
node:<xsl:apply-templates/>
<xsl:apply-templates select="@*"/>
</xsl:template>

<xsl:template match="@*">
attr:<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>

For some reason with MSXML it did not work (produced not values of 
node values or attributes. It did work with Xalan C++.

The following stylesheet is according to a third party working 
correctly.

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="text"/>

<xsl:template match="*">
        node:<xsl:apply-templates select="node()"/>
        <xsl:apply-templates select="@*"/>
</xsl:template>

<xsl:template match="@*">
        attr:<xsl:value-of select="."/>
</xsl:template>

</xsl:stylesheet>


So my question is which processor (well IE aint a processor)
is doing the job correct 

Cheers,
</Jarkko>

***************************************************
* Jarkko Moilanen                                 *
* Project Researcher, ITCM (www.itcm.org)         *
* Profound XML technology Expert                  *
* University of Tampere                           *
* Hypermedia Laboratory                           *
***************************************************

 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.