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

RE: Newbie final Tag question

Subject: RE: Newbie final Tag question
From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx>
Date: Tue, 24 Sep 2002 23:26:33 +0100
tag question
If you have a template that matches the parent of <prod> you could
output a literal-result-element <prod> and then apply-templates, then
have a template matching <prod> and copy its children elements through:

<xsl:template match="parentOfProd">
  <prod>
    <xsl:apply-templates/>
  </prod>
</xsl:template>

<xsl:template match="prod">
  <xsl:copy-of select="child::*"/>
</xsl:template>

will give you

<prod>
  <op>abc123</op>
  <op>xyz987</op>
</prod>

cheers
andrew

> -----Original Message-----
> From: Holmberg Rick-ra0119 [mailto:Rick.Holmberg@xxxxxxxxxxxx]
> Sent: 24 September 2002 23:07
> To: Xsl-List (E-mail)
> Subject:  Newbie final Tag question
> 
> 
> Hoping someone can help with this one...
> 
> I have a file like
> <prod>
>     <op>abc123</op>
> </prod>
> <prod>
>     <op>xyz987</op>
> </prod>
> 
> I want to parse through this and output
> <prod>
>      <op>abc123</op>
>      <op>xyz987</op>
> </prod>
> 
> No matter which way I try, I keep getting a closing </prod> 
> tag where I dont' want one or it processes teh second <prod> twice.
> Any help is appreciated.
> Thanks!
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.391 / Virus Database: 222 - Release Date: 19/09/2002
>  
> 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.391 / Virus Database: 222 - Release Date: 19/09/2002
 

 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.