Viewing source in XML to XHTML transformation thro

2019-07-06 22:41发布

I'm trying to use an XSL file to transform an XML file into an XHTML file. How can I view the XHTML source that is output after the transformation. I'm currently viewing the results through Firefox, but all I see is the rendered version of the XHTML file. I want to see the source, but when I go to View->Page Source, all I see is the XML. I'm running Ubuntu.

Thanks in advance!

-- Corey

2条回答
手持菜刀,她持情操
2楼-- · 2019-07-06 23:00

I would do the transform on the command line and then point firefox at the generated file until you have the XHTML correct.

The command you need would be something like:

xsltproc -o xshtmlfile.html xslfile.xsl xmlfile.xml

You may need to install libxslt to get the xsltproc command.

查看更多
时光不老,我们不散
3楼-- · 2019-07-06 23:09

Use the Web developer toolbar, and utilize its View Generated Source option.

From the context menu choose Web Developer --> View Source --> View generated source.

Here's a link to a w3school's XSL sample page if anyone wants to test it out.

查看更多
登录 后发表回答