Subject: RE: pattern matching possible?
From: "Hardy Merrill" <HMerrill@xxxxxxxxxxxxxxxx>
Date: Thu, 13 May 2004 09:00:40 -0400
|
A co-worker of mine found the answer this morning on MS support site:
http://support.microsoft.com/default.aspx?scid=kb;en-us;315719
Note that we *are* using MSXML 4.
Here's a snipped from that page:
SUMMARY
MSXML includes two functions that you can use to filter data in a
case-insensitive search. With MSXML 3.0, you can use the translate
function. With MSXML 4.0, you can use either the translate function or
the new ms:string-compare XPath function.
oXML.setProperty "SelectionLanguage", "XPath"
set node = oXML.selectSingleNode("Domains/DomainName[translate(.,
'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') =
'mydomain1.com']")
---------------------------------------------------------
So, going with the "translate" approach, all we had to do was add this
line:
oXML.setProperty "SelectionLanguage", "XPath"
and then our translate worked fine.
Thanks for the input.
Hardy Merrill
>>> John.Hansen@xxxxxxxxxx 05/12/04 04:40PM >>>
This error indicates that you are not using DOMDocument40 but, rather,
an earlier version (DOMDocument30 pssibly) which uses Microsoft's old
XSL language (by default) rather than the standard XSL language.
-----Original Message-----
From: Hardy Merrill [mailto:HMerrill@xxxxxxxxxxxxxxxx]
Sent: Wednesday, May 12, 2004 3:23 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx; davidc@xxxxxxxxx
Subject: Re: pattern matching possible?
Sorry for the top post - thank Groupwise :(
I can't get 'translate' to work - this code (and many other similar
versions):
--------------------------------
Dim a
a =
"applications/application/acronym[translate(.,'ABCDEFGHIJKLMNOPQRSTUVWXY
Z','abcdefghijklmnopqrstuvwxyz')='"
& LCase(sNodeText) & "']"
oDupNodes = Session("Applications").selectNodes(a)
-------------------------------
produces this ASP error:
Unknown method.
applications/application/acronym[-->translate(.<--,'ABCDEFGHIJKLMNOPQRST
UVWXYZ','abcdefghijklmnopqrstuvwxyz')='asap']
Any ideas? Notice that it doesn't seem to like the 'translate'
function.
TIA.
Hardy Merrill
| Current Thread |
- Re: pattern matching possible?, (continued)
- David Carlisle - Wed, 12 May 2004 17:47:46 +0100
- George Cristian Bina - Wed, 12 May 2004 19:58:36 +0300
- Hardy Merrill - Wed, 12 May 2004 16:23:11 -0400
- Hansen, John - Wed, 12 May 2004 13:40:50 -0700
- Hardy Merrill - Thu, 13 May 2004 09:00:40 -0400 <=
- Hansen, John - Thu, 13 May 2004 06:23:01 -0700
- taciana - Thu, 13 May 2004 19:19:04 -0700 (PDT)
- Hardy Merrill - Thu, 13 May 2004 09:40:33 -0400
|
|