xsl-list
[Top] [All Lists]

[xsl] Prepending remote url to tei image input

2008-10-02 00:00:32
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...


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>