• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

extracting a filepath from an XML node

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Some of the nodes in my XML document contain file paths for instance:

<multimedia>
<imagepath>c:\html_test\image\a-35-52.jpg</imagepath>
<\multimedia>

I am using an xsl stylesheet to transform the XML document to HTML.
I would like to use the imagepath nodes to make links in the HTML document,
To do this I am simply using the "value-of" the imagepath node within a "href" tag in the XSL document as follows:

<xsl:for-each select="multimedia">
<a href="<xsl:value-of select="imagepath"/>">view image</a>
<p \>
</xsl:for-each>

...however it isnt working for me. Is it possible to do this? I think I might need to use an escape character or something like that.
Any suggestions?
Thanks,

Eoin.
 
Eoin Mac Aoidh
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Typo there on the last <p /> tag. Whops!
 
Marshal
Posts: 28425
102
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<a><xsl:attribute name="href"><xsl:value-of select="imagepath"/></xsl:attribute>view image</a>
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic