[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Expanding 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|