stoolpigeon
Programmer
I have an XML file that I transform into a fixed width text file using XSLT and the MSXML 3.0 parser. Recently the XML file was changed and I've been rewriting my XSL file. A schema was added and for some reason my XSL doesn't work any more unless I make a change to the XML file. Right now the file comes to me like this:
And my XSL file starts out:
I've got some VB scripts stuff in there and what not then I get to my first template and it runs like this:
The root matches up but then it never drops into the for each because apparently /Data/Vendor does not match. If I leave the xsl the way it is but change the data element in the XML file to this:
Then everything works and the file gets transformed. If I have to I guess I can edit the XML file with my code before I load it up into DOM but I think my problem is maybe I need to do something in XSL to get the namespace to mach up-- but I can't figure out how.
Any help -- or a point in the right direction to some resources would be very much appreciated.
Code:
<?xml version="1.0" encoding="utf-8" ?>
<Data xmlns="[URL unfurl="true"]http://www.healthoutsource.com/JdaSchema/XMLAOPlacement1.xsd"[/URL] xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance">[/URL]
<Vendor>
Code:
<?xml version="1.0" ?>
<xsl:stylesheet
xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform"[/URL]
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:user="[URL unfurl="true"]http://mycompany.com/mynamespace"[/URL]
version="1.0">
Code:
<xsl:template match="/">
<xsl:for-each select="/Data/Vendor[Confirmed_Id=$repidin or Confirmed_Id=$repidin2]">
Code:
<Data xmlns:a="[URL unfurl="true"]http://www.healthoutsource.com/JdaSchema/XMLAOPlacement1.xsd"[/URL] xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance">[/URL]
Any help -- or a point in the right direction to some resources would be very much appreciated.