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

xsi:schemaLocation in target XML Doc using XSLT

Subject: xsi:schemaLocation in target XML Doc using XSLT
From: "Ivo Ottiger" <ivo.ottiger@xxxxxxxxxx>
Date: Fri, 20 Apr 2001 10:35:04 +0200
xslt xsi schemalocation
Hi,

First of all thanks for tips on namespaces and XSLT in my previous
question...

As I am new to xsl I have another problem.

I try to transform the following XML

<?xml version="1.0"?>
<ROWSET>
	<ROW num="1">
		<TICKER>ORCL</TICKER>
	</ROW>
	<ROW num="2">
		<TICKER>SUNW</TICKER>
	</ROW>
</ROWSET>

with the following XSL

<?xml version="1.0"?>
<!-- quotes.xsl: Transform to Quote.dtd vocabulary -->
<xsl:stylesheet version="1.0"
xmlns="http://www.portfolio.org/Portfolio/Request"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/1999/XMLSchema/instance"
xsi:schemaLocation = "http://www.portfolio.org/Portfolio/Request
http://www.portfolio.org/Portfolio/Request pfl_req.xsd">
	<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
	<xsl:template match="/">
		<PortfolioReq>
			<xsl:for-each select="ROWSET/ROW">
				<Symbol>
					<xsl:value-of select="TICKER"/>
				</Symbol>
			</xsl:for-each>
		</PortfolioReq>
	</xsl:template>
</xsl:stylesheet>

The result is

<?xml version="1.0" encoding="UTF-8"?>
<PortfolioReq xmlns="http://www.portfolio.org/Portfolio/Request"
xmlns:xsi="http://www.w3.org/1999/XMLSchema/instance">
   <Symbol>ORCL</Symbol>
   <Symbol>SUNW</Symbol>
</PortfolioReq>

but I am missing the xsi:schemaLocation in the target XML doc.

Any help, thanks.
Ivo


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


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.