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

Re: newbie needs help

Subject: Re: newbie needs help
From: Abhijit Junnare <mavlaabhi@xxxxxxxxx>
Date: Thu, 11 Sep 2003 12:43:01 -0700 (PDT)
Re:  newbie needs help
May be this would work for you

 <xsl:template match="document">
  <document>
  <xsl:copy-of select="form|.//document/link"/>
  </document>
 </xsl:template>

Abhi



--- Brian Benson <bbenson@xxxxxxxxxxxx> wrote:
> 
> Thanks David.
> 
> The code you wrote for me, did exactly what I asked
> for.  Unfortunately, I
> didn't ask a specific enough question.
> 
> Not all documents in the source xml  file contain
> links and I want the
> output xml to only contain documents that have
> links.  How can the template
> below be changed to only output documents that
> contain links.
> 
> 
> 
> 
> 
> <xsl:template match="document">
>  <document>
>  <xsl:copy-of select="form|.//link"/>
>  </document>
> </xsl:template>
> 
> David
> 
> 
> 
> =======================================
> 
> This is probably easy for someone who knows what
> they are doing, but I
> haven't been able to figure this out.
> 
> I'm trying to transform XML to XML.  The end result
> I want is something
> like:
> 
> <document>
>       <form>forminfo</form>
>       <link>linkinfo</link>
> </document>
> 
> 
> The problem that I'm having is this:  in the source
> xml file, the <form>
> information is always at the same level in the
> source document, but the
> <link> information can be any number of levels deep.
> 
> For example it could look like this:
> 
> <document>
>       <form>forminfo</form>
>       <link>linkinfo</link>
> </document>
> 
> or it could look like this:
> 
> <document>
>       <form>forminfo</form>
>       <table>
>             <link>linkinfo</link>
>       </table>
> </document>
> 
> 
> or like this:
> 
> <document>
>       <form>forminfo</form>
>       <table>
>             <table>
>                   <link>linkinfo</link>
>             </table>
>       </table>
> </document>
> 
> 
> I need to find a way to ignore all of the levels of
> table information and
> just get the form and the link information in my
> output file.  Any help is
> appreciated.
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

 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.