XSLT refactor operation for extracting attributes from LREs

Are you missing a feature? Request its implementation here.
jelovirt
Posts: 84
Joined: Tue Oct 11, 2005 9:17 am
Location: Helsinki, Finland
Contact:

XSLT refactor operation for extracting attributes from LREs

Post by jelovirt »

I'd like to see an addition to the XSLT refactoring operation list, extracting attributes in Literal Result Elements into xsl:attribute instruction. If you have, say

Code: Select all

  <foo bar="baz"/>
The extract attributes would turn this into

Code: Select all

  <foo>
<xsl:attribute name="bar">baz</xsl:attribute>
</foo>
Not the most used feature, but still something I occasionally would like to be able to automatically. And if you have

Code: Select all

  <foo bar="baz{qux}quxx"/>
this would be turned into e.g.

Code: Select all

  <foo>
<xsl:attribute name="bar">
<xsl:text>baz</xsl:text>
<xsl:value-of select="qux"/>
<xsl:text>quxx</xsl:text>
</xsl:attribute>
</foo>
or

Code: Select all

  <foo>
<xsl:attribute name="bar">
<xsl:value-of select="concat('baz', qux, 'quxx')"/>
</xsl:attribute>
</foo>
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Thank you for the request. We will consider implementing it.

Regards,
Sorin
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

We added the requested XSLT refactoring action. It will be available in version 7.2.

Regards,
Sorin
Post Reply