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

Re: convert a url path to an xpath

Subject: Re: convert a url path to an xpath
From: "M. David Peterson" <m.david.x2x2x@xxxxxxxxx>
Date: Wed, 29 Dec 2004 19:43:35 -0700
convert to url
BTW... if using XSLT 2.0 Michael Kay pointed out in a post or two
before the link I just sent you a MUCH easier way to do this kind of
thing...

http://www.stylusstudio.com/xsllist/200405/post00270.html


On Wed, 29 Dec 2004 19:39:58 -0700, M. David Peterson
<m.david.x2x2x@xxxxxxxxx> wrote:
> The folowing post from a while back showcases how to do this kind of
> thing to build a yahoo-style directory based on a parameter passed in
> that contains the current path location within your site...
> 
> http://www.stylusstudio.com/xsllist/200405/post80280.html
> 
> Hope this helps!
> 
> <M:D/>
> 
> 
> On Thu, 30 Dec 2004 10:33:53 +0800, Lincoln Mitchell
> <lincoln@xxxxxxxxxxx> wrote:
> > I have a path like www.domain.com/company/about/staff.htm and match
> > "company/about/staff" in the sitemap.
> > However, I cannot use this path directly in my xpath expression as the xml
> > looks like:
> >
> > ...
> > <wx:sub-section>
> >  <w:p>
> >    <w:r>
> >      <w:t>company</w:t>
> >    </w:r>
> >  </w:p>
> >  ...
> >  <wx:sub-section>
> >    <w:p>
> >      <w:r>
> >        <w:t>about</w:t>
> >      </w:r>
> >    </w:p>
> >    ...
> >    <wx:sub-section>
> >      <w:p>
> >        <w:r>
> >          <w:t>staff</w:t>
> >        </w:r>
> >      </w:p>
> >      ...
> > ...
> >
> > So, somehow I need to create a xpath from the path "company/about/staff"
> > that looks like:
> > "wx:sub-section[w:p/w:r/w:t='company']/wx:sub-section[w:p/w:r/w:t='about']/w
> > x:sub-section[w:p/w:r/w:t='company']"
> >
> > But how?
> > Any help greatly appreciated.
> >
> > Linc
> >
> >
> 
> 
> --
> :: M. David Peterson ::
> XML & XML Transformations, C#, .NET, and Functional Languages Specialist
> 


-- 
:: M. David Peterson ::
XML & XML Transformations, C#, .NET, and Functional Languages Specialist

Current Thread

Back To School Sale!

Save 30% off all Stylus Studio 2008 Products when you purchase from our Online Shop.

Offer ends August 31, 2008.

Coupon Code
TRTY-C4JV-OFF

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-2007 All Rights Reserved.