[oXygen-user] Treating Selected Project Resources as XQuery Collection?

Eliot Kimber
Thu May 5 13:38:51 CDT 2016


It looks like if I format my result as a number padded with zeros then I
can sort the result list and get the top numbers to the top.

format-number(max(count(/*/*[contains(@class, ' topic/body
')]//table/tgroup/tbody/row) ), '00000')

Cheers,


E.
----
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com




On 5/5/16, 1:26 PM, "Eliot Kimber" < on
behalf of > wrote:

>I want to use the XQuery against files feature to do some quick analysis:
>Find topics with large tables and report those files and only those files.
>
>It's not obvious, and I didn't find it in the help, how to do this. My
>hope would be that when the scope selected in the XPath/XQuery builder is
>"selected project resources" that those would be treated as a collection
>so I could do e.g.:
>
>For $doc in collection()
>    Return {do stuff with the docs}
>
>Is this possible?
>
>The analysis I'm trying to do is to find the largest tables within the set
>of documents and then report those tables sorted by size. I can do this as
>an Xpath but the results are ordered by the order of the documents in the
>input doc so I have to scroll through a list of 1500 results to find the
>few that I'm interested in.
>
>Of course I could do this in a standalone Xquery but I was hoping there
>was a quick way to do it in the Xquery builder.
>
>Thanks,
>
>Eliot
>
>----
>Eliot Kimber, Owner
>Contrext, LLC
>http://contrext.com
>
>
>
>_______________________________________________
>oXygen-user mailing list
>
>https://www.oxygenxml.com/mailman/listinfo/oxygen-user
>




More information about the oXygen-user mailing list