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

Re: Select on Text Node, XML Out of Ancestors

Subject: Re: Select on Text Node, XML Out of Ancestors
From: John Robert Gardner <jrgardn@xxxxxxxxx>
Date: Mon, 1 Nov 1999 11:31:30 -0500 (EST)
node xml
Thanks to David and James, I'm getting good progress now, however I've
wound up by-passing one of my primary objectives, which is to preserve all
extant markup in the result output, cf. a reply I sent offlist in case I
was being too obtuse . . . .

> I need to preserve all the element markup _as well as_ the content.  In
> other words, all i"m trying to do is cut-down the original instance to
> only those records with subfield text xxxx-xxx.  

> So here's a stylesheet which simply needs to do what it now does,
> _while preserving_all the markup in the result instance:
> 
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>                  version="1.0">
> 
> <xsl:output method="xml"/>
> 
> <xsl:for-each select="record[data-field/subfield='0039-310X']">
> <xsl:apply-templates mode="copy" select="."/>
> </xsl:for-each>
> 
> <xsl:template mode="copy" match="*">
> <xsl:copy>
> <xsl:copy-of select="@*"/>
> <xsl:apply-templates mode="copy"/>
> </xsl:copy>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> However, all this so far is not at all wasted, as going backward to a
> non-xml record form will eventually be a project, so now we've
> inadvertently done this.
> 
> =-=-=-=-=-=-=-=-=-==-=-=-=
> John Robert Gardner
> XML Engineer
> ATLA-CERTR
> ------------------------------------------------------------
> http://vedavid.org/
> http://www.purl.org/CERTR/
> 
> On Mon, 1 Nov 1999, David Carlisle wrote:
> 
> > 
> > 
> > > "node() in step pattern not implemented"
> > 
> > so where did you put node in a step pattern, ie one with / ?
> > 
> > Anyway you can replace node() with * here unless you expect to copy
> > process instructions and other special stuff.
> > 
> > David
> > 
> 
> 
> 


 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.