Page 1 of 1

XSLT refactor operation for extracting attributes from LREs

Posted: Tue Jan 31, 2006 4:50 pm
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>

Posted: Wed Feb 01, 2006 12:48 pm
by sorin_ristache
Thank you for the request. We will consider implementing it.

Regards,
Sorin

Posted: Thu Mar 16, 2006 1:48 pm
by sorin_ristache
Hello,

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

Regards,
Sorin