[oXygen-user] Treating Selected Project Resources as XQuery Collection?
Eliot Kimber
Thu May 5 13:58:38 CDT 2016
If the results aren't padded the sorting appears to be lexical, that is 9
sorts before 1000.
Cheers,
E.
----
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com
On 5/5/16, 1:50 PM, "George Bina" <> wrote:
>Hi Eliot,
>
>The scope basically executes the XPath expression on each file from the
>working set, but the sorting on the results view should work also
>without the need to use the format-number function... I tried on a few
>files an XPath like
>
>/*/count(*)
>
>and then I clicked on the Description column to sort the results and
>that worked fine.
>
>Best Regards,
>George
>--
>George Cristian Bina
><oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
>http://www.oxygenxml.com
>
>On 05/05/16 21:38, Eliot Kimber wrote:
>> 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
>>>
>>
>>
>> _______________________________________________
>> oXygen-user mailing list
>>
>> https://www.oxygenxml.com/mailman/listinfo/oxygen-user
>>
>
More information about the oXygen-user
mailing list