[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
xsi:schemaLocation in target XML Doc using XSLT
- From: Ivo Ottiger <ivo.ottiger@bluewin.ch>
- To: Xml-Dev <xml-dev@lists.xml.org>
- Date: Fri, 20 Apr 2001 10:39:58 +0200
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