Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: RDF to HTML with XSLT >Thread Next - Re: RDF to HTML with XSLT Re: RDF to HTML with XSLTTo: NULL Date: 1/10/2005 7:53:00 AM Joe, I thought that was just if the output was going to be XML in this case its not. The xsl outputs html not xml. Should I still be doing the transformNodeToObject anyway (issues with the input and matching types of xml and xsl?) BTW what was posted works fine but I would be more than happy to change if that is the better method. Only ask cause I would like to understand. Thanks again everyone, Jason "Joe Fawcett" wrote: > "Jason Burr" <JasonBurr@d...> wrote in message > news:DB2E90AA-4691-4918-951D-9B8161D30C44@m...... > > Thanks everyone who pitched in to help me. I went back to some code I > > wrote a > > while back that was a lot cleaner (for postal api's) and started from > > scratch > > this seems to work just fine. This does not however end the issue as I > > have > > the same problem on client side code and suspect it has to do more with > > which > > xml object versions are being used. Anyway for anyone who may have looked > > at > > this and wanted to know the solution here it is > > > > Response.Buffer = True > > Response.charset = "utf-8" > > > > strXMLOut="<?xml version=""1.0"" encoding=""utf-8""?>" &_ > > "<rdf:RDF" &_ > > " xmlns:rdf = ""http://www.w3.org/1999/02/22-rdf-syntax-ns#"" " &_ > > " xmlns:dc = ""http://purl.org/dc/elements/1.1/"" " &_ > > " xmlns:mq = ""http://musicbrainz.org/mm/mq-1.1#"" " &_ > > " xmlns:mm = ""http://musicbrainz.org/mm/mm-2.1#"">" &_ > > "<mq:FindArtist>" &_ > > " <mq:depth>4</mq:depth>" &_ > > " <mq:artistName>Portishead</mq:artistName>" &_ > > "</mq:FindArtist>" &_ > > "</rdf:RDF>" > > > > strUrl = "http://www.musicbrainz.org/cgi-bin/mq_2_1.pl" > > > > strXSLPath = Server.MapPath("music.xsl") > > > > Set xmlDoc = Server.CreateObject("MSXML.DOMDocument") > > Set xmlhttp = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0") > > xmlhttp.open "POST", strUrl, false > > xmlhttp.send strXMLOut > > > > strXMLReturn = xmlhttp.responseText > > xmlDoc.validateOnParse = False > > xmlDoc.loadXML(strXMLReturn) > > > > Set xmlhttp = Nothing > > > > 'Load the XML. > > Set source = Server.CreateObject("MSXML2.DOMDocument.3.0") > > source.async = false > > source.resolveExternals = false > > source.load(xmlDoc) > > > > 'Load the XSLT. > > Set style = Server.CreateObject("MSXML2.DOMDocument.3.0") > > style.async = false > > style.resolveExternals = false > > style.load(strXSLPath) > > strOutPut = source.transformNode(style) > > > > Response.Write strOutPut > > > > Set xmlDoc = Nothing > > Set source = Nothing > > Set style = Nothing > > > > As Martin said don't response.write the xml, do: > source.transformNodeToObject style, Response > Response.flush > response.end > > -- > > Joe > > > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
