Re: [xsl] Dividing a long document into seperate documents

Subject: Re: [xsl] Dividing a long document into seperate documents
From: "Jay Bryant" <jay@xxxxxxxxxxxx>
Date: Tue, 15 Aug 2006 16:53:57 -0500
The reason it's creating just one record is because it's counting up the
preceding-sibling axis. As it happens, the metadata elements have no RDF
elements as preceding siblings, so it never gets anywhere. If you're trying
to create an RDF file for each metadata/oai_dc:dc element, then count those
elements, thus:

<xsl:for-each select="metadata/oai_dc:dc">
  <xsl:result-document href="{concat('rdf',
count(preceding-sibling::oai_dc:dc) +1, '.rdf')}">
    <!-- Snipped the other processing -->
  </xsl:result-document>
</xsl:for-each>

HTH

Jay Bryant
Bryant Communication Services

Current Thread