[oXygen-user] code template for identity transform
Jarno Elovirta
Thu Jun 17 00:28:03 CDT 2010
I disagree here, ³id² is a named template I use on almost all of my projects
and it¹s always to do with id attributes, never identity trasform templates.
I personally favor ³copy² name for those. Thus I think the code template
should remain unnamed by default.
Cheers,
Jarno
On 2010-6-13 15:16, "Lars Huttar" <> wrote:
> Thank you for this. I am glad but not very surprised to see Oxygen already
> offers this... it usually has everything that would be commonly useful!
>
> The only thing I see lacking here is discoverability. Next time I go to use
> this pattern, if it's not soon, I'm not sure how I will remember to use "ct",
> as I do not remember hearing "copy template" or "recursive copy template" as a
> term for the pattern.
> Is it a well-known term? I've only heard of it as the "identity
> transformation". E.g. at http://www.w3.org/TR/xslt#copying it is referred to
> that way; and a yahoo search for xslt "identity transform" gives me about 100x
> as many results as for xslt "recursive copy template". (xslt "copy template"
> gives about 20x, but with many false positives.)
>
> Would it be reasonable to add "id" as a name for this code template?
>
> Thanks,
> Lars
>
> On 6/12/2010 2:14 PM, George Cristian Bina wrote:
>> Dear Lars,
>>
>> There is already a code template that inserts the recursive copy template.
>> Its name is "ct" so if you type
>>
>> ct
>> then CTRL+Enter
>> you should get
>>
>> <xsl:template match="node() | @*">
>> <xsl:copy>
>> <xsl:apply-templates select="node() | @*"/>
>> </xsl:copy>
>> </xsl:template>
>>
>> Best Regards,
>> George
>
>
>
> _______________________________________________
> oXygen-user mailing list
>
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20100617/dfe1f9e5/attachment.html
More information about the oXygen-user
mailing list