[xsl] Prepending remote url to tei image input

Subject: [xsl] Prepending remote url to tei image input
From: "Gavin" <gavin@xxxxxxxxxxxxxxxx>
Date: Thu, 2 Oct 2008 13:59:44 +1000
Hi All,

I'm working on some odt output stuff generated from xdoc, some of what I am
doing relies on a tei input plugin to convert tei to xdoc.

The current part I'm stuck on involves pulling content from remote locations
- including images.

The remote source tei is like this :-

<figure rend="somepic" url="/images/image.jpg"/>

and I can successfully transform this into xdoc using :-

<xsl:template match="figure">
  <img>
    <xsl:attribute name="src"><xsl:value-of select="@url"/></xsl:attribute>
    <xsl:attribute name="alt"><xsl:value-of select="@rend"/></xsl:attribute>
  </img>
</xsl:template>

and get an xdoc output of :-

<img alt="somepic" src="/images/image.jpg"/>

However, the image is remote to the document so the image will still not
appear. I need to be able to detect and prepend the www.example.com address
to the src, the prepending is easy, but how to capture the remote www
address has got me.

Any clues?

Take a look at https://issues.apache.org/jira/browse/FOR-1121 for more
details.

Thanks

Gav...

Current Thread