xsl-list
[Top] [All Lists]

Re: [xsl] [xslt] not working transformation when function called

2009-03-19 17:08:05
And all i need to achieve is to transform that:
<move>
               <from>
                  <dataname>01</dataname>
                  <dataname>02</dataname>
               </from>
               <to>
                 <qualification>
                   <dataname>001</dataname>
                   <dataname>002</dataname>
                 </qualification>
               </to>
 </move>

to:

<move>
               <from datatype='XXX'> <!-- VALUE RETURNED BY
local:getNodeTypeFUNTION -->
                  <dataname>01</dataname>
                  <dataname>02</dataname>
               </from>
               <to>
                 <qualification datatype='ZZZ'> <!-- VALUE RETURNED BY
local:getNodeTypeFUNTION -->
                   <dataname>001</dataname>
                   <dataname>002</dataname>
                 </qualification>
               </to>
 </move>

On Thu, Mar 19, 2009 at 9:50 PM, Michalmas <michalmas(_at_)gmail(_dot_)com> 
wrote:
But why this trigger:

<xsl:template match="move/from">
 <datatype><xsl:value-of select="local:getNodeType(/,
./dataname)"/></datatype> <!--DATATYPE -->
</xsl:template>

doesn't work?

On Thu, Mar 19, 2009 at 9:30 PM, Christopher R. Maden 
<crism(_at_)maden(_dot_)org> wrote:
Michalmas wrote:
I have following xslt:

<xsl:template match="*">
   <xsl:copy-of select="." />
</xsl:template>

This template matches the move element.  It copies the move element and
does not other processing.  The from elements are never processed.

It is not clear from this example what this template is supposed to do,
but it is very unusual and almost certainly not what you want.

~Chris
--
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
“All I ask of living is to have no chains on me,
 And all I ask of dying is to go naturally.” — Laura Nyro
GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319

--~------------------------------------------------------------------
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>
--~--