View Single Post
  #1 (permalink)  
Old October 9th, 2006, 09:13 PM
Someone2006 Someone2006 is offline
Registered User
 
Join Date: Oct 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSL newbie question

Hi,

I'm a complete newbie to XSL and I was wondering if someone could help me with my first attempt of this technology.
Here's the XML:

<catalog xmlns="http://www.catalog.org/xml/export-0.3/">
  <dir>
    <id>user:XXX/home</id>
    <text>my text 1</text>
    <foo>zzz</foo>
  </dir>

  <dir>
    <id>user:XXX/home/work</id>
    <text>my text 2</text>
    <foo>zzz</foo>
  </dir>

  <dir>
    <id>user:YYY/home</id>
    <text>my text 3</text>
    <foo>zzz</foo>
  </dir>

  <dir>
    <id>Something completely different</id>
    <text>my text 4</text>
    <foo>zzz</foo>
  </dir>
</catalog>

I'd like to select the <dir> nodes who's <id> is something like "user:*/home". This is the expected output:

<new>
  <dir>
    <id>user:XXX/home</id>
    <text>my text 1</text>
  </dir>

  <dir>
    <id>user:YYY/home</id>
    <text>my text 3</text>
  </dir>
</new>

Thanks,
-S.


Reply With Quote