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

RE: Problem relocating nodes and then applying templat

Subject: RE: Problem relocating nodes and then applying templates
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Wed, 17 Sep 2003 04:43:10 +0100
xml templat
Sounds as if you're doing the right thing: 

apply-templates select="//figure[@id="current()/@figures]"

(or using keys would be faster)

This will process the referenced figure, as a sort of subroutine, and
then return to continue where the processing left off, dealing with the
figureAnchor. 

But it seems you've coded it wrong. The usual plea therefore - we can't
debug your code without seeing it.

Michael Kay


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Ryan Graham
> Sent: 16 September 2003 18:41
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Problem relocating nodes and then applying templates
> 
> 
> Hi,
> 
> I currently have the following type of reference scattered 
> throughout an XML document (used as place-holders):
> 
> <figureAnchor figures="c01-fig-xxxx"/>   ["xxxx" is some number]
> 
> all of which reference a node structure at the end of the xml file:
> 
> <figureGroup>
>     <figure id="c01-fig-0001">
>         <graphic xlink:href="file://images/someimage1.jpg" />
>         <caption>
>             <p>Figure caption 1</p>
>         </caption>
>     </figure>
>     <figure id="c01-fig-0002">
>         <graphic xlink:href="file://images/someimage2.jpg" />
>         <caption>
>             <p>Figure caption 2</p>
>         </caption>
>     </figure>
>     ...
> </figureGroup>
> 
> When I come upon a <figureAnchor> tag during the transform to 
> an FO document, is there anyway to grab the proper node from 
> the end of the document, insert it at the <figureAnchor> 
> location, and then apply-templates to format the elements??  
> I've tried copy-of, but this only writes the raw XML to the 
> output FO file.  When trying apply-templates, the processor 
> jumps to the <figureGroup> at the end of the file, and 
> proceeds to process from there (skipping the processing of 
> the rest of the xml file between <figureAnchor> and <figureGroup>).
> 
> Any suggestions are greatly appreciated.
> 
> Thanks,
> 
> Ryan Graham
> Digital Content Developer
> Ryan.Graham@xxxxxxxxxxxxx
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 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.