xsl-list
[Top] [All Lists]

RE: [xsl] Changing the Attibute Value

2008-07-21 00:33:37
Dear All,

Following is my partial XSLT, 

1. I am not able to access Attribute for changing it
2. How do I extract only "ChamferedRectangle" and place "Fillet"


<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
        <xsl:template match="/">      
                <xsl:apply-templates select="*"/>
        </xsl:template>
    <xsl:template match="@* | node()">
        <xsl:copy>
          <xsl:apply-templates select="@* | node()"/>
        </xsl:copy>
    </xsl:template>

   <xsl:template match="VisualObject[(_at_)xsi:type='CChamferEx']">             
                <xsl:copy>
                        <xsl:variable name="attribute" select = '.'/>
                        <xsl:value-of select="CFilletEx"/>
                </xsl:copy>
        </xsl:template>
</xsl:stylesheet>

Buddhi D. Mahindarathne wrote:
Dear All, 
I want to transform following using XSLT 1.0

<VisualObject xsi:type="CChamferEx">
      <maxQSwitch>133</maxQSwitch>
       <Address>Laser Job.Layer.ChamferedRectangle1</Address>
       <Name>ChamferedRectangle1</Name>
       <IsMark>true</IsMark>
       <Visible>true</Visible>
</VisualObject>

And get the output like this:

<VisualObject xsi:type="CFilletEx">
      <maxQSwitch>133</maxQSwitch>
       <Address>Laser Job.Layer.Fillet1</Address>
       <Name>Fillet1</Name>
       <IsMark>true</IsMark>
       <Visible>true</Visible>
</VisualObject>

Here are the things associated with this,

1. Attribute Change
2. Change last part on DOT separated value (I need to keep the last
value with the "Fillet" like [Fillet1] - in the sample number "one") 
3. Change the Chamfer to Fillet, but need to keep the last number like
above case.

Please help me on this.

- Regards
  ____            _     _ _     _ 
 | __ ) _   _  __| | __| | |__ (_)
 |  _ \| | | |/ _` |/ _` | '_ \| |
 | |_) | |_| | (_| | (_| | | | | |
 |____/ \__,_|\__,_|\__,_|_| |_|_|
                                  


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




  


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>