XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] are the regular expressions over xml structure?

> Unfortunately, this code is not enough. Imagine a mostly identity
> transform with such grouping. What to do with the elements "caption"
> and "table"?

In an identity transform situation, have no-op templates for caption
and table, with suitable predicates eg

<xsl:template match="caption[preceding-sibling::*[1][self::image]"/>

and then the usual way to handle them from the image template is with a mode:

<xsl:template match="image[following-sibling::*[1][self::caption]] .... ">
    (output the image markup)
    <xsl:apply-templates
select="following-sibling::*[1][self::caption]" mode="image-caption"/>

with

<xsl:template match="caption" mode="image-caption">
  ...
</


-- 
Andrew Welch
http://andrewjwelch.com


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS