|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsi:schemaLocation in target XML Doc using XSLT
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








