1 Feb 2004 12:23
Re: eXist MODS XQuery example
Wolfgang Meier <meier <at> ifs.tu-darmstadt.de>
2004-02-01 11:23:29 GMT
2004-02-01 11:23:29 GMT
> Can you send me a XQuery example that should work with MODS data in the > Java client? Say I want to return all titles where the record has a > topic element value of "riot". > > Nothing I do works! OK. The shortest formulation would be: declare default element namespace "http://www.loc.gov/mods/v3"; //mods[subject/topic = 'riots']/titleInfo If you would like to return additional elements, for example, the name fields: declare default element namespace "http://www.loc.gov/mods/v3"; for $hit in //mods[subject/topic = 'riots'] return <mods>{($hit/titleInfo, $hit/name)}</mods> The for loop iterates through each of the items matching the XPath expression //mods[subject/topic = 'riots']. For each iteration, the current item is placed into variable $hit and the return clause is called once. The result of the return clause is then copied to the output sequence. Inside the return clause, you can construct new XML nodes using pseudo-XML syntax (it looks like XML but is actually translated into an expression tree). You may(Continue reading)
) Nonetheless I get the same error.
>
>G:\eXist\bin>startup.bat
>Invalid initial heap
>size: -Xms64000k -Xmx256000k -Dfile.encoding=UTF-8 -Djava.e
>ndorsed.dirs="G:\eXist\lib\endorsed"
>Could not create the Java virtual machine.
>G:\eXist\bin>
>
.
> I had the same problem but a somewhat different stacktrace sending
> SIGQUIT to tomcat.
>
>
> Java stack information for the threads listed above:
> ===================================================
> "TP-Processor15":
> at org.exist.collections.Collection.getDocuments(Collection.java:255)
> - waiting to lock <0x5479eba0> (a org.exist.collections.Collection)
RSS Feed