Hi,
The attached script is a demonstration for the three extensions
(::Specifity, ::GetElement and ::ToXPath). It requires these,
XML::Parser, XML::LibXML, LWP::Simple, and CSS::SAC of course.
It takes a XML document and a style sheet as arguments, e.g.
perl script http://example.org/xml http://example.org/css
For example, if you have
<root>
<x></x>
<x>...</x>
</root>
and a style sheet
:empty { }
you will get an XHTML document with the matched elements highlighted, in
this case:
...
<pre>
<root>
<span class='selectorviz1'><x></x></span>
<x>...</x>
</root>
</pre>
...
regards.
|