<HTML>
<HEAD>
<TITLE>Re: [oXygen-user] code template for identity transform</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>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.<BR>
<BR>
Cheers,<BR>
<BR>
Jarno<BR>
<BR>
<BR>
On 2010-6-13 15:16, "Lars Huttar" <<a href="lars_huttar@sil.org">lars_huttar@sil.org</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>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!<BR>
<BR>
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.<BR>
Is it a well-known term? I've only heard of it as the "identity transformation". E.g. at <a href="http://www.w3.org/TR/xslt#copying">http://www.w3.org/TR/xslt#copying</a> 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.)<BR>
<BR>
Would it be reasonable to add "id" as a name for this code template?<BR>
<BR>
Thanks,<BR>
Lars<BR>
<BR>
On 6/12/2010 2:14 PM, George Cristian Bina wrote: <BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Dear Lars, <BR>
<BR>
There is already a code template that inserts the recursive copy template. Its name is "ct" so if you type <BR>
<BR>
ct <BR>
then CTRL+Enter <BR>
you should get <BR>
<BR>
<xsl:template match="node() | @*"> <BR>
<xsl:copy> <BR>
<xsl:apply-templates select="node() | @*"/> <BR>
</xsl:copy> <BR>
</xsl:template> <BR>
<BR>
Best Regards, <BR>
George <BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"></SPAN><FONT SIZE="2"><SPAN STYLE='font-size:10pt'>_______________________________________________<BR>
oXygen-user mailing list<BR>
<a href="oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a><BR>
<a href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user">http://www.oxygenxml.com/mailman/listinfo/oxygen-user</a><BR>
</SPAN></FONT></FONT></BLOCKQUOTE>
</BODY>
</HTML>