how to add namespace and schema through xslt 1.0

abecks555

New Member
I have recieved multiple xml documents that I have to transform through xsl into one unifrom xml document.I also have to add a namespace and schema to this result xml document. My problem is that I have to add the schema and the namespaces to this document through the xsl stylesheet and I have no idea how to do it. Although I've come a long way to figure out how to add namespaces, how do I give my xml result document the location of my schema through the stylesheet?This is what I have in my stylesheet at the moment which doesn't work, because of the schemaLocation:\[code\]<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:main="http://www.vm.com/main" xmlns:teleprompt ="http://www.vm.com/teleprompt" xmlns:warner ="http://www.vm.com/warner" xsi:schemaLocation="http://www.vm.com/main mainSchema.xsd" version="1.0">\[/code\]And this is what I have where I want the namespaces to be used:\[code\]<album teleprompt:type="simple" teleprompt:href="http://www.vm.com/teleprompt">\[/code\]I also need this above code to apply to everything in its tree.There are four of these albums and only two of them need namespaces.Please don't give me the answers breaking up the elements into templates as I'm not using an in my stylesheet.Thanks alot for the help.
 
Back
Top