|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Wrapping groups
[Paul Prescod]
> Is it possible to transform something like this:
>
> <a/><b/>
> <a/><b/>
> <a/><b/>
> <a/><b/>
>
> into
>
> <w><a/><b/></w>
> <w><a/><b/></w>
> <w></a><b/></w>
>
> Adding wrappers around repeated patterns strikes me as quite
> important and common.
It would be possible with the addition of a sibling operator:
<xsl:template pattern="two-item-list">
<xsl:process select="a"/>
</xsl:template>
<xsl:template pattern="a">
<w>
<a/>
<xsl:process select="right-sibling(b)"/>
</w>
</xsl:template>
<xsl:template pattern="b">
<b/>
</xsl:template>
But the pattern language doesn't currently have such an operator, I
don't think.
-Chris
--
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








