From: Wolfgang M. <me...@if...> - 2002-10-11 14:13:04
|
Hi, > 1) On XMLRPC, when I specify a URL in getDocument > such as xsl=3D"http://localhost/somedir/doc.xslt", > I get an error that the path can't be found, and > I see eXist is trying to add the URL to the > file path, not treating it as a URL. Is this a > neglected parameter? Should XSL selection > be available for other commands besides > getDocument? (I could see it useful having an XSL > store internal to eXist and already cached for > common XPath queries, for example). the setXSLStylesheet() method in class Serializer should check if an abso= lute=20 URL has been passed to it. If not, the URL is treated relative to the=20 collection of the current document and the stylesheet is loaded from eXis= t. Somehow this doesn't work with the XMLRPC getDocument method. I still hav= e to=20 figure out why ... > 2) When I do a query such as: > > collection('efd/products/')/efd[vendor_call=3D'*ro*']/vendor_call > > it works, even case-insensitive matching "ROSS", but doing: > > collection('efd/products/')/efd[vendor_call &=3D'*ro*']/vendor_call > > I think I saw something that in 0.8-1 wildcards don't work > with &=3D, but how then is =3D successfully using wildcards & > case-insensitive, since I thought =3D conformed to official > case-sensitive XPath while &=3D was added to get around that? the configuration file contains an option to specify if the string functi= ons=20 should treat strings case sensitive or not. There's an attribute=20 "caseSensitive" in the <indexer> section. Set it to "false" to have=20 case-sensitive matching. the =3D operator only accepts the * wildcard (used internally to process = the=20 starts-with, contains and ends-with functions), but no regular expression= s. The &=3D used to accept regular expression syntax before v. 0.8. I had to= change=20 this due to changes in the string tokenizer. You now have to use the=20 match-all and match-any functions, e.g.: collection('efd/products/')/efd[match-all(vendor_call, '.*ro.*')]/vendor_= call which selects all vendor_call elements containing a keyword which matches= =20 =2E*ro.*. the syntax is: match-xxx(node-list, regexp [,regexp]*) if you have more than one keyword, match-all will only succeed if every r= egexp=20 in the list is matched by at least one keyword occurring in the text cont= ent=20 of the context node. match-any succeeds if any regexp matches. Searching for keywords with a regular expression is maybe a little bit=20 uncommon, but it is quite usefull sometimes. BTW: it is much faster to search for ro.* to match ROSS, because eXist wi= ll=20 use the first characters to restrict the range of keywords to search in. Wolfgang |