XML - > XSL - > HTML编辑文件,以及xml WITHOUT asp中的SAVE更改

时间:2022-04-18 09:55:55

I have an XML file that I've transformed with xsl and loaded into a browser as html. That html is editable using a rich text editor by the user. When they're done I need to transform their html edits back to the original xml document.

我有一个XML文件,我用xsl转换并以html形式加载到浏览器中。该html可由用户使用富文本编辑器进行编辑。当它们完成后,我需要将它们的html编辑转换回原始的xml文档。

One solution I've found is using ASP: http://www.w3schools.com/xsl/xsl_editxml.asp

我发现的一个解决方案是使用ASP:http://www.w3schools.com/xsl/xsl_editxml.asp

But I'm using Apache and I don't have ASP installed, and I'm wondering if there is an easier/better way to do this without using ASP.

但我正在使用Apache而我没有安装ASP,我想知道是否有更简单/更好的方法来做到这一点而不使用ASP。

Or is ASP the only way?

或ASP是唯一的方法吗?

Thanks =)

谢谢=)

2 个解决方案

#1


1  

The solutiton that you found doesn't do what you describe. It only presents the data from the XML as a form, and lets the user edit the values. That's not very complex, and you can do that using pretty much any other server side language, like PHP for example.

您找到的解决方案并不符合您的描述。它仅将XML中的数据作为表单呈现,并允许用户编辑值。这不是很复杂,你可以使用几乎任何其他服务器端语言,例如PHP。

What you describe, on the other hand, is quite complex. It involves examining the XSL and the HTML to identify the parts of the HTML code that was created using specific XML data, so that changes can be reflected back. That's not something that is done with a simple ASP script like that.

另一方面,你描述的内容非常复杂。它涉及检查XSL和HTML以识别使用特定XML数据创建的HTML代码部分,以便可以反映更改。这不是像这样简单的ASP脚本完成的事情。

#2


0  

If you design an XSL transformation for both directions, XML to HTML and HTML to XML, comparing the source XML and resulting user XML should be a much easier problem to solve.

如果为两个方向设计XSL转换,XML到HTML和HTML到XML,比较源XML和生成的用户XML应该是一个更容易解决的问题。

#1


1  

The solutiton that you found doesn't do what you describe. It only presents the data from the XML as a form, and lets the user edit the values. That's not very complex, and you can do that using pretty much any other server side language, like PHP for example.

您找到的解决方案并不符合您的描述。它仅将XML中的数据作为表单呈现,并允许用户编辑值。这不是很复杂,你可以使用几乎任何其他服务器端语言,例如PHP。

What you describe, on the other hand, is quite complex. It involves examining the XSL and the HTML to identify the parts of the HTML code that was created using specific XML data, so that changes can be reflected back. That's not something that is done with a simple ASP script like that.

另一方面,你描述的内容非常复杂。它涉及检查XSL和HTML以识别使用特定XML数据创建的HTML代码部分,以便可以反映更改。这不是像这样简单的ASP脚本完成的事情。

#2


0  

If you design an XSL transformation for both directions, XML to HTML and HTML to XML, comparing the source XML and resulting user XML should be a much easier problem to solve.

如果为两个方向设计XSL转换,XML到HTML和HTML到XML,比较源XML和生成的用户XML应该是一个更容易解决的问题。