I am working on a new project that has a system that builds an XML file and assorte开发者_开发问答d XSLT files for the stylesheets. If I want to take the completed page in the browser and modify it - and then decompile it into its component parts - how would one do it?
You mean you want to reverse the transformation? So if the XML contains the prices of all your products, and the HTML displays their sum, you want the user to be able to change the total, and you go back and recompute the prices of all the products? Think again about what you are asking for.
Generally, obtaining the input from the output of a transformation is not possible.
This is exactly the same if you substitute in the above sentence the word "transformation" with the word "function.
A function has a reverse one only if it is a 1:1 mapping.
Any function that is not 1:1 doesn't have a reverse function.
So, if it is possible that a transformation produces the same output from more than one XML document, then just looking at the output it is not possible to determine which exactly of these XML documents was the input.
You cannot. [spacer data here]
精彩评论