xsl-list
[Top] [All Lists]

contains

2004-06-02 07:48:25
XSL newbie alert.

We're having problems with the 'contains' statement.  Our XML looks
like this:

   <persons>
         <person scrn_fld="person_1">
                 <name>Joe</name>
         </person>
         <person scrn_fld="new_user_1">
                 <name>Joe</name>
         </person>
         <person scrn_fld="new_user_2">
                 <name>Jim</name>
         </person>
   </persons>

Notice that 'person' attribute 'scrn_fld' can have values starting with
either 'person' or 'new_user'.  In an effort to get only 'new_user'
nodes, we can't get this to work:

    var personNodes = root.selectNodes("//person[contains(@scrn_fld,
'new_user')]");


Note that this code is Javascript code - anyone know if/why Javascript
has a problem with this?  This seems to work ok in ASP.  We're using
MSXML 4.0.

TIA.

Hardy Merrill


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