|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Getting the deepest node and calculating relative
> I need to transform an XML that looks like: > > <Root> > <Paths> > <Path value="/Catalog/Department/Product/SKU"/> > <Path value="/Catalog/Department/@dept_id"/> > <Path value="/Catalog/Department/Product/Name"/> > <Path value="/Catalog/Department/Product/Price"/> > <Path value="/Catalog/Department/Product/Variant/Name"/> > </Paths> > </Root> > > to something that looks like: > > <Root> > > <LongestPath>/Catalog/Department/Product/Variant/Name</LongestPath> Would counting the number of "/" characters give you the right answer? You can do that as string-length($path) - string-length(translate($path, '/', '')) Mike Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








