xsl-list
[Top] [All Lists]

RE: multi-document question

2003-11-23 11:59:33
-----Original Message-----
From: Bruce D'Arcus

With this, then:

    <xsl:template match="mods">
         <exsl:document href="{(_at_)id}(_dot_)mods" method="xml">
         <xsl:copy>
                 <xsl:copy-of select="." />
         </xsl:copy>
         </exsl:document>
    </xsl:template>


Try removing the surrounding <xsl:copy ...>, optionally replace it with:

<xsl:element name="modsCollection">
  <xsl:copy-of select="." />
</xsl:element>

Finally, I should probably tackle is this:

I am using some identifier to name the individual files.  In this case
it is the id on the mods element. In other cases, it will be another
element within mods called identifier with a type attribute value of
citekey.  In still other cases, this identifier may be missing
altogether and I'd want to construct by perhaps selecting the first
author family name and the year.

If I want to do this, what is the best strategy?


Depends... In the 'other cases', is the id attribute going to be absent (or
have a special value)?
In that case, certainly look around for the usage of
<xsl:choose>
  <xsl:when />
  <xsl:otherwise />
</xsl:choose>

You can use this inside the template you already have.

Cheers,

Andreas


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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