[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: how to sort a list of xpaths

Subject: RE: how to sort a list of xpaths
From: "Philip Fearon" <pgfearo@xxxxxxxxxxxxxx>
Date: Tue, 22 Jan 2008 09:02:10 +0000
 RE: how to sort a list of xpaths
Mark H Wrote:
>...Here's my question (finally!) - do anyone have a utility or xslt, perl
>etc that can sort these [XPath] rules based on a schema?

There is a utility app I wrote called SketchPath that is an XPath
library manager that may help.

This provides a GUI for building, testing and managing your XPath
expressions. Whilst the utility doesn't sort XPath expressions in the
way that you seek, it saves the XPath expressions in XML in a form
that may be sorted, extract below:


<Expression diffgr:id="Expression5"  msdata:rowOrder="0"
diffgr:hasChanges="inserted" >
<isvariable>true</isvariable>
<name>Member-5</name>
<group>Group1a</group>
<fullexpression>/Tournament/Teams/Team[2]/Member</fullexpression>
<recentvalue>p2</recentvalue>
<context>/</context>
<comment>Tournament.xml</comment>
<textStart>372</textStart>
<textLength>17</textLength>
</Expression>

<Expression diffgr:id="Expression6" ...

The <textStart> and <textLength> elements contain the start position
and length of the first node in the xml nodeset returned by the
expression. These values are stored when the expression is evaluated
against the xml instance that the XPath expressions were developed
with.

Some additional XSLT would then allow you to turn this XML into a
sorted list of XPath expressions. The assumption is that its possible
to create an XML instance that can represent the document node order
in all permitted cases.

Phil Fearon
http://www.sketchpath.com

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.