<xsl:template match="oc-value['{.}'='mValue2']">
    </xsl:template>

The predicate '{.}'='mValue2'is always false, since you're comparing two
string literals which are not equal.  It looks like you're confusing
attribute value templates with match patterns.  Try this instead:

<xsl:template match="oc-value[. = 'mValue2']">
</xsl:template>

Dave



                                                                                
                               
                      "Monica Ferrero"                                          
                               
                      <[EMAIL PROTECTED]         To:      [EMAIL PROTECTED]     
                     
                      arconi.com>               cc:                             
                               
                                                Subject: Problems to compare 
the value of a node               
                      02/15/2002 09:11                                          
                               
                      AM                                                        
                               
                                                                                
                               
                                                                                
                               




Hi!

I'm using Xalan 2.3.0 to do tranformations in dsml files. I'd like to be
able to have a template that selects a given node knowing its content. The
concrete example is removing one of the  <oc-value> nodes knowing its
content, ie 'mValue2'  (that is really the only way of distinguish one
<oc-value> node from the rest, given that the position can be arbitrary).
I was trying something like the following, that doesn't match the node:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version
="1.0">

    <xsl:template match="oc-value['{.}'='mValue2']">
    </xsl:template>

</xsl:stylesheet>

An example dsml input file would be:

<?xml version="1.0"?>
<dsml>
    <directory-entries>
        <entry dn="cn=B, cn=C">
            <objectclass>
                <oc-value>mValue1</oc-value>
                <oc-value>mValue2</oc-value>
                <oc-value>mValue3</oc-value>
            </objectclass>
            <attr name="cn">
                <value>B</value>
        </entry>
    </directory-entries>
</dsml>

Thank you very much for your help,

Monica Ferrero



------------
This e-mail and any attachments are confidential.  If you are not the
intended recipient, please notify us immediately by reply e-mail and then
delete this message from your system. Do not copy this e-mail or any
attachments, use the contents for any purpose, or disclose the contents to
any other person: to do so could be a breach of confidence.




Reply via email to