xsl-list
[Top] [All Lists]

RE: multi-document question

2003-11-23 09:20:50
Hi Bruce,

Why don't you change the code to:
<xsl:copy>
        <xsl:copy-of select="*@|node()" />
</xsl:copy>

--------------------------------------
Elisha Ben-Zvi
Mail: elisha(_dot_)ben-zvi(_at_)sap(_dot_)com
Phone: (972)-9-7620242
Cellular: (972)-66-232304
-----Original Message-----
From: Bruce D'Arcus [mailto:bdarcus(_at_)fastmail(_dot_)fm] 
Sent: Sunday, November 23, 2003 18:11 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] multi-document question

On Nov 23, 2003, at 4:54 AM, Andreas L. Delmelle wrote:

Try replacing this:

         <xsl:copy>
            <xsl:apply-templates select="@* | node()"/>
         </xsl:copy>

with :

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

Thanks Andreas!  This almost does this trick.

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>

I get this:

<mods>
    <mods id="one">
       <para>one</para>
    </mods>
</mods>

The problem is the repeating mods root elements, and I either need 
this...

<modsCollection>
    <mods id="one">
       <para>one</para>
    </mods>
</modsCollection>

...or just:

    <mods id="one">
       <para>one</para>
    </mods>

I assume I need to modify the <xsl:copy-of select="." />, but I'm 
unsure how.

Also, this schema requires a namespace declaration on the root.  How do 
I get that in the xslt?

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?

Thanks,
Bruce


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

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



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