Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: newbie xsl:processing-instruction question >Thread Next - Re: newbie xsl:processing-instruction question Re: newbie xsl:processing-instruction questionTo: NULL Date: 9/7/2007 5:38:00 PM Wow, Thanks for the swift, comprehensive reply. I tried your javascript trick (?) and I got: ---- <?xml-stylesheet version="1.0" type="text/xsl" href="page.xslt"?> <result /> ---- However I don't get: <?xml version='1.0' encoding="utf-8" ?> I assume that's FireFox 'trying to render the xml' :) I'm downloading saxon now... Having solved that mystery I now find myself with another one which perhaps would be better as a separate thread. I'll mention it here just in case it's another obvious case of ignorance..: I'd hoped that the output of the transform would also be transformed into html by FireFox (which is the purpose of page.xslt): ------------------ <?xml version='1.0' encoding="utf-8" ?> <?xml-stylesheet version="1.0" type="text/xsl" href="page.xslt"?> <result /> ------------------ Can browsers perform this two stage transform? Thanks again for your time, Martin Martin Honnen wrote: > Martin Welch wrote: > >> Now I don't know if this is significant but I'm using firefox 2.x on >> WinXP to open pi.xml and looking at the results using WebDeveloper >> 1.1.4 which gives me an option to view generated source. >> >> I've searched the newsgroups for two days now with no result. >> >> Could anyone give me a clue where I might be going wrong? Can anyone >> suggest a better (free) tool to help 'debug' my feeble attempts? > > I have tried your sample with Firefox 2.0, to check the result document > I have typed > javascript: alert(new XMLSerializer().serializeToString(document)); void 0 > in the location bar (as one line) and hit enter. > Rest assured that the processing instruction is part of the result > document so the XSLT transformation is working fine in Firefox. > You can also simply use Tools -> DOM Inspector to see the nodes in the > result document, it also shows the processing instruction node. > > No idea about WebDeveloper, check whether they have a mailing list or > forum to ask why it does not show that processing instruction. > > And generally, unless you are specifically developing for Firefox, I > think learning XSLT and transforming XML to XML is better done with a > command line XSLT processor such as (for instance) Saxon 6 > <URL:http://saxon.sourceforge.net/saxon6.5.5/index.html> as that way you > see the result document in the console window or in a file editor. A > browser tries to render the XML and that way you see only the text node > content and not the XML. > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
