[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: Fri, 26 Dec 2008 12:28:54 +0530
Re:  multiple files to single file problem
Hai All,

Is exclude-result prefixes also applicable to attributes? But the
xlink namespace is populated in the blow example even when we have
used exclude-result-prefixes="xlink" in the <stylesheet>

Here is the example:

input:
<cross-ref refid="aff1">

XSL:

	<xsl:template match="cross-ref | cross-refs">
		<xsl:element name="xref">
			<xsl:attribute name="xlink:href">
				<xsl:value-of select="@refid"/>
			</xsl:attribute>
			<xsl:apply-templates/>
		</xsl:element>
	</xsl:template>


output from XSL:
<xref xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="aff1">

required output:

<xref xlink:href="aff1">

How to eliminate namespace prefix in the output?

Regards,
Ganesh


On Wed, Dec 10, 2008 at 2:36 PM, Michael Kay <mike@xxxxxxxxxxxx> wrote:
>> 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.
>
> That's what exclude-result-prefixes is for.
>
> 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-2013 All Rights Reserved.