[oXygen-user] code template for identity transform

George Cristian Bina
Sat Jun 12 14:14:28 CDT 2010


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
-- 
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 6/12/10 2:54 PM, Lars Huttar wrote:
> Dear Oxygen folks,
>
> I often find the need to insert an identity transform template into an
> XSLT stylesheet I'm writing, but I don't always remember the correct
> XPath for the match pattern and the apply-templates/@select, and it's a
> nuisance to have to keep looking it up.
>
> A few times I've created a code template in Oxygen for it, but it keeps
> disappearing as I upgrade Oxygen. Would you consider adding this code
> template to the built-in list for the XSL editor? It seems like it would
> be useful to a lot of XSL developers.
>
> Name: id
> Description: Identity transform.
> Associate with: XSL Editor.
> Content:
> <!-- Identity transform -->
> <xsl:template match="@* | node()">
> <xsl:copy>
> <xsl:apply-templates select="@* | node()"/>
> </xsl:copy>
> </xsl:template>
>
> No doubt you can tweak the content if there is a more approved variation
> on the above.
>
> Thanks for your consideration,
> Lars
>
>
>
> _______________________________________________
> oXygen-user mailing list
> 
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user



More information about the oXygen-user mailing list