Thank you for all your advice. It all worked.
From: "Geert Josten" <geert(_dot_)josten(_at_)daidalos(_dot_)nl>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: RE: [xsl] Forcing the order of templates in XSLT/XSLFO
Date: Fri, 13 Oct 2006 22:36:23 +0200
Yes there are ways to check this. Simplest one is to use
preceding-sibling::image or following-sibling::table.
Alternatively, you could try an approach from the parent element, where
you apply all child element except table first and finish with applying
tables only. Something like:
<xsl:template match="root">
<xsl:copy>
<xsl:apply-templates select="@*|node()[not(self::table)]"/>
<xsl:apply-templates select="table"/>
</xsl:copy>
</xsl:template>
Just an idea..
Kind regards,
Geert
>
Drs. G.P.H. Josten
Consultant
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan
dit bericht kunnen geen rechten worden ontleend.
> Van: Meenakshi Nanjundeswar [mailto:meenananju(_at_)hotmail(_dot_)com]
> Verzonden: vrijdag 13 oktober 2006 22:26
> Aan: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
> Onderwerp: [xsl] Forcing the order of templates in XSLT/XSLFO
>
> Hi :
>
> I have a question about forcing the order of elements in xslt.
> Suppose I have an XML:
>
> <root>
>
> <table>Sometable</table>
> <text>Some text</text>
> <image>An Image</image>
> <table>This table is assoc. with the image above</table>
>
> </root>
>
> Now the issue I am facing is, I have template for the
> element "table"since it can appear anywhere in the document.
> However, I want the "table" element that is after the "image"
> element to appear only after the "image" element.
> How can I achieve this? I tried using mode but it did not work.
>
> Is there any way I can check if "table" element is after
> "image" element?
>
> All your help is appreciated.
>
> Thanks
>
> _________________________________________________________________
> Try the new Live Search today!
> http://imagine-windowslive.com/minisites/searchlaunch/?locale=
> en-us&FORM=WLMTAG
>
>
> --~------------------------------------------------------------------
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
> --~--
>
>
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
_________________________________________________________________
Search?Your way, your world, right now!
http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-us&FORM=WLMTAG
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--