Hi BaseX Gurus,
Thanks for such a powerful reporting tool. I am still a newbie to XML and I would be lost without BaseX. Thank-you!
I was wondering whether there is any way to have the path summary output it's result in alphabetical sequence of attributes and then elements? I export the path summary from different versions of the XML and use BeyondCompare to reveal the differences but the inconsistent ordering of the elements and attributes makes this a bit of a challenge.
It would be really handy for me if there were an option available where I could elect to output the Path Summary with the attributes sorted alphabetically followed by the elements also in alphabetical order (within their parent). If you could consider this for a future enhancement I would be forever grateful.
Of course, if there is an easier way for me to compare XML structure, I would love to know the tricks!
Thanks again for your dedication to this os product.
Cecil Tarasoff
Hi Cecil,
Maybe the following code could help you :
declare function local:ordered-facets($facets) { element { $facets/name() } { $facets/@name, for $node in $facets/(attribute|element) order by $node/name(), $node/@name return local:ordered-facets($node) } };
local:ordered-facets(index:facets('my collection')/document-node)
But be careful because in XML, elements' order is meaningful.
Everybody would be lost without basex, not only newbies !
Best regards, Fabrice
De : basex-talk-bounces@mailman.uni-konstanz.de [mailto:basex-talk-bounces@mailman.uni-konstanz.de] De la part de Cecil Tarasoff Envoyé : jeudi 2 avril 2015 07:17 À : basex-talk@mailman.uni-konstanz.de Objet : [basex-talk] Path Summary order
Hi BaseX Gurus,
Thanks for such a powerful reporting tool. I am still a newbie to XML and I would be lost without BaseX. Thank-you!
I was wondering whether there is any way to have the path summary output it's result in alphabetical sequence of attributes and then elements? I export the path summary from different versions of the XML and use BeyondCompare to reveal the differences but the inconsistent ordering of the elements and attributes makes this a bit of a challenge.
It would be really handy for me if there were an option available where I could elect to output the Path Summary with the attributes sorted alphabetically followed by the elements also in alphabetical order (within their parent). If you could consider this for a future enhancement I would be forever grateful.
Of course, if there is an easier way for me to compare XML structure, I would love to know the tricks!
Thanks again for your dedication to this os product.
Cecil Tarasoff
basex-talk@mailman.uni-konstanz.de