How about "idt" as a name, mnemonic with "identity transform" (or
"identity template"). That would be easily discoverable from the
content completion list, and would not conflict with "id" for id
attributes.
Lars
On 6/17/2010 12:28 AM, Jarno Elovirta wrote:
Re: [oXygen-user] code template for identity transform
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" <lars_huttar@sil.org> 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
oXygen-user@oxygenxml.com
http://www.oxygenxml.com/mailman/listinfo/oxygen-user