xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] multiple files to single file problem


Subject: Re: [xsl] multiple files to single file problem
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Tue, 9 Dec 2008 14:42:25 +0100 (CET)

Ganesh Babu N wrote:

> <xsl:element name="author">
>    <xsl:value-of select="
>        $a/article/head/author-group/author/given-name"/>
>    <xsl:text/>
>    <xsl:value-of select="
>        $a/article/head/author-group/author/surname"/>
> </xsl:element>

  The <xsl:text/> doesn't have any effect here.

  You create a single one element author, with the value-of a set of
given-name elements (basically, their string values are concatenated
into a single text node, separated by spaces,) then with the value-of
a set of surname elements.  The result is then correct.

  You can try the following instead:

       ...
       <xsl:apply-templates select="
           $a/article/head/author-group/author"/>
       ...

    <xsl:template match="author">
       <xsl:copy>
          <xsl:value-of select="given-name"/>
          <xsl:text> </xsl:text>
          <xsl:value-of select="surname"/>
       </xsl:copy>
    </xsl:template>

  Note the use of a separate template rule.

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/


Current Thread
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor