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

RE: Expanding XML navigation

Subject: RE: Expanding XML navigation
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Tue, 21 Sep 2004 16:58:09 +0100
xml navigation
> I am trying to produce a fragment from a linkmap XML which
> will represent the linkmap as the user opens up particular
> pages in the hierarchy. SImilar in appearance to
> http://ecolore.leeds.ac.uk/xml/about/site.xml?> lang=en
> I  use
> a page parameter to define which part will
> need its child element displayed.
>
> Then I intend to process this new accurate piece of XML via
> another stylesheet in order to style it.
>
> The problem I get is in preparing the first XML.
>
> I have used copy-of, starting from the Current page, however
> this shows all the descendants and I only want to show its
> children I presume you can't use a predicate with it?
>
> Then If I try using xsl:copy instead I am tying myself up in
> a mess. Any chance of some help?


You will need the identity transform with a no-op template:

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

<xsl:template match="x|y|z"/>

Where 'x' 'y' and 'z' are the names of the elements you don't want to
copy through.  Using your thought pattern this would be equivalent to
copy-of select with a predicate (which is of course not possible, as
copy-of select creates an exact copy).

Cheers
andrew

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.