|
Subject: Re: Wrapping groups From: Chris Maden <crism@xxxxxxxxxxx> Date: Mon, 14 Sep 1998 11:46:56 -0400 (EDT) |
[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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Wrapping groups, Paul Prescod | Thread | Beyond the identity transform, Paul Prescod |
| Re: multiple Formatting namespaces., Henry S. Thompson | Date | Re: multiple Formatting namespaces., James Tauber |
| Month |