xsl-list
[Top] [All Lists]

Re: [xsl] Re: How to handle dynamic XPath

2009-04-14 12:36:08
Hi Mukul,

The answers to all your questions are positive.

The only problem is that at present and in the immediate future I am
fully booked and don't have time even for the most interesting ideas
I'd like to play with.

So, in the immediate future you could co-operate with someone else
(probably Florent) to use the XPath parser. I'd still be glad to
assist.



-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play


On Tue, Apr 14, 2009 at 9:00 AM, Mukul Gandhi 
<gandhi(_dot_)mukul(_at_)gmail(_dot_)com> wrote:
Hi Dimitre,

On Mon, Apr 13, 2009 at 7:20 PM, Dimitre Novatchev 
<dnovatchev(_at_)gmail(_dot_)com> wrote:
Another major use of an XPath 2.0 parser could be in a refactoring
tool, and also adding to Mukuls Lint the so needed XPath expression
analysis.

Actually analyzing the code quality of XPath expressions was not any
of goals of my project
(http://gandhimukul.tripod.com/xslt/xslquality.html).

My goal was to only analyze XML oriented quality of XSLT code.

I would be interested to know your notion of XPath code quality. Can
you please suggest some code quality rules for XPath? I would be
interested to enhance my utility for XPath code quality as well. If
the XPath parser you have written can help to enhance my utility, I
would be keen to use your parsing framework.

I express the XSLT code quality rule as, for e.g.,

<xpath>
   //(@match | @select)[starts-with(., '//')]
</xpath>

This rule is a XPath expression. Can you think of a simple way to
express XPath code quality rules (perhaps in XPath/XML format)?

One way I can think is, your parsing framework can build a AST for
XPath fragments (in user's XSLT stylesheets). Then we could serialize
this AST to XML (which will actually be an XML representation of XPath
expression to be analyzed). This XML serialized AST can be an input to
the XPath code quality rules. In this way, we can express the XPath
code quality rules like the one above.

Does your parser support building AST for an XPath expression? If yes,
can we serialize the AST to an XML format? Also can all this be done
in pure XSLT? Or we would have to use another programming language for
AST generation, and it's XML serialization?

Or can you give a better idea.


--
Regards,
Mukul Gandhi

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--