[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: multiple files to single file problem

Subject: Re: multiple files to single file problem
From: "Ganesh Babu N" <nbabuganesh@xxxxxxxxx>
Date: Wed, 10 Dec 2008 10:38:11 +0530
Re:  multiple files to single file problem
On Tue, Dec 9, 2008 at 7:06 PM, Michael Kay <mike@xxxxxxxxxxxx> wrote:
>>
>>       <xsl:template match="/" name="main">
>>               <xsl:element name="cover-body">
>
> It's so much clearer if you use literal result elements: <cover-body>
> instead of <xsl:element name="cover-body">.

If I use the <cover-body> instead of <xsl:element name="cover-body">
All the namespace uris are appearing along with the cover-body tag
which i do not want. So I am using <xsl:element name="cover-body">.
Suggest any way where we can use only <cover-body> and namespace uris
is not getting populated.

>
>>                       <xsl:for-each select="for $x in
>> collection('file:///D:/cover/sample
>> xmls/pageall/else/nima?select=*.xml;recurse=yes;on-error=ignore')
>> return $x">
>
> The XPath expression "for $x in EXPR return $x" can always be rewritten
> "EXPR". You just want
>
>
> <xsl:for-each select="collection(....)">
>
>>                               <xsl:variable name="a"
>> select="document(document-uri(/))"/>
>
> That's equivalent to <xsl:variable name="a" select="."/>
>
>>               <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>
>>                                       </xsl:element>
>
> xsl:value-of takes the selected nodes (all the given-names) and outputs
> their values, space-separated. So you have asked for all the given-names,
> space-separated, then all the surnames, space-separated. What you want is
> this:
>
> <author>
>  <xsl:for-each select="$a/article/head/author-group/author">
>    <xsl:value-of select="given-name, surname"/>
>  </xsl:for-each>
> </author>
>
> perhaps with some added punctuation or markup.
>
> Michael Kay
> http://www.saxonica.com/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.