<!-- 

getImageNameData.xsl: go through the content.xml file from an
OpenOffice Writer file and pull out the matching pairs of image
names and href values. Save the result in WriterImageNames.xml,
which addImageRefs.xsl will use to add image references to a
DocBook file saved from Writer.

Bob DuCharme 2009-11-05 No warrantee expressed or implied.

 -->


<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
>

  <xsl:strip-space elements="*"/>
  <xsl:output indent="yes"/>

    <xsl:template match="/">
      <imageLinks>
      <xsl:apply-templates/>
      </imageLinks>
    </xsl:template>

  <xsl:template match="text()"/>
  <xsl:template match="draw:image[@xlink:href]">
    <imageLink name="{../@draw:name}" href="{@xlink:href}"/>
  </xsl:template>

</xsl:stylesheet>
