You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Lionel Villard <vi...@us.ibm.com> on 2003/07/25 20:08:36 UTC
XPath API issues and plans
Hi all,
I want to give you an overall of the remaining issues that need to
be addressed to fulfill the XPath API requirements (in xstl20 branch under
the xpath_rwapi directory). One of these requirements is to allow several
applications to implement and/or reuse efficiently the XPath API and many
problems need to be solved in order to reach it. Here the list of these
issues and also more general tasks to be done:
XPath public API:
- namespace/qname resolver : most of applications use a qname manager for
example to share the same qname pool throughout their application.
Currently the public XPath API relies on the JAXP QName definition. I want
to remove this dependency and to define a QName interface that
applications can implement within their QName manager.
- The same mecanism should be provided for the data model (sequence type
and item type).
XPath API implementation:
- Semantic analysis: currently no semantic analysis is performed.
Therefore the expression a/(43+23)/f is correctly parsed but an error
should be raised.
- An "optimization mode" should be provided. In this mode, only obvious
optimizations should be done, for example constant folding.
Parser:
- function call: right now, 'function call' AST nodes are created without
knowing the name of the function, which prevent fine-grain specialisation
at construction time. The same problem occurs with sequence types. I just
need to figure out how to do it in javacc.
- updates the XPath grammar. Not an issue, just a lot of work.
That's it for now. Comments are greatly appreciated!
Cheers,
Lionel Villard
IBM T.J Watson Research
Lionel Villard
IBM T.J Watson
Re: XPath API issues and plans
Posted by Lionel Villard <vi...@us.ibm.com>.
There is two parts in the XPath API: the definition of the API itself and
its implementation. I agree that the optimization mode is not exposed in
the API.
Thanks for your comments!
Lionel Villard
IBM Research.
Elliotte Rusty Harold <el...@metalab.unc.edu>
08/10/2003 07:04 AM
Please respond to xalan-dev
To: xalan-dev@xml.apache.org
cc:
Subject: Re: XPath API issues and plans
At 2:08 PM -0400 7/25/03, Lionel Villard wrote:
- An "optimization mode" should be provided. In this mode, only obvious
optimizations should be done, for example constant folding.
Should this really be an API issue? Perhaps it could be better served
by a system property that determined whether or nor optimizations
were performed. This could be access from within code by those who
cared about it, without cluttering the API.
--
Elliotte Rusty Harold
elharo@metalab.unc.edu
Processing XML with Java (Addison-Wesley, 2002)
http://www.cafeconleche.org/books/xmljava
http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA
Re: XPath API issues and plans
Posted by Elliotte Rusty Harold <el...@metalab.unc.edu>.
At 2:08 PM -0400 7/25/03, Lionel Villard wrote:
- An "optimization mode" should be provided. In this mode, only obvious
optimizations should be done, for example constant folding.
Should this really be an API issue? Perhaps it could be better served
by a system property that determined whether or nor optimizations
were performed. This could be access from within code by those who
cared about it, without cluttering the API.
--
Elliotte Rusty Harold
elharo@metalab.unc.edu
Processing XML with Java (Addison-Wesley, 2002)
http://www.cafeconleche.org/books/xmljava
http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA
Re: XPath API issues and plans
Posted by Lionel Villard <vi...@us.ibm.com>.
Semantic analysis: currently no semantic analysis is performed.
Therefore the expression a/(43+23)/f is correctly parsed but an error
should be raised.
> IMO, I think it would be OK to let the application that uses the XPath
API find/report these errors. In the case above, if the app supports
static
> typing, then it can report an error given that not(xs:integer <: node).
I think it would be great if the XPath API provides this feature that can
be turned on or not. However I agree it is not critical (especially since
I read again the Basic XPath functionnality level, and realized that a
dynamic error is raised for "a/(43+23)/f")
function call: right now, 'function call' AST nodes are created without
knowing the name of the function, which prevent fine-grain specialisation
at construction time. The same problem occurs with sequence types. I just
need to figure out how to do it in javacc.
> Could you elaborate this a bit more?
Right now, each time a function call is parsed, an AST node is created by
only passing the node id to the factory method. Therefore, applications
can't create sub-objects of FunctionCallImpl by using the name of the
function call. I suppose that during the call of the create method in
SimpleNode it's possible to get the last token that was parsed.
Thanks!
Lionel
Santiago Pericas-Geertsen <Sa...@sun.com>
07/28/2003 10:55 AM
Please respond to xalan-dev
To: xalan-dev@xml.apache.org
cc:
Subject: Re: XPath API issues and plans
Lionel Villard wrote:
XPath API implementation:
- Semantic analysis: currently no semantic analysis is performed.
Therefore the expression a/(43+23)/f is correctly parsed but an error
should be raised.
IMO, I think it would be OK to let the application that uses the XPath
API find/report these errors. In the case above, if the app supports
static typing, then it can report an error given that not(xs:integer <:
node).
Parser:
- function call: right now, 'function call' AST nodes are created without
knowing the name of the function, which prevent fine-grain specialisation
at construction time. The same problem occurs with sequence types. I just
need to figure out how to do it in javacc.
Could you elaborate this a bit more?
Thanks.
-- Santiago
Re: XPath API issues and plans
Posted by Santiago Pericas-Geertsen <Sa...@sun.com>.
Lionel Villard wrote:
>
> XPath API implementation:
>
> - Semantic analysis: currently no semantic analysis is performed.
> Therefore the expression a/(43+23)/f is correctly parsed but an error
> should be raised.
IMO, I think it would be OK to let the application that uses the XPath
API find/report these errors. In the case above, if the app supports
static typing, then it can report an error given that not(xs:integer <:
node).
> Parser:
>
> - function call: right now, 'function call' AST nodes are created without
> knowing the name of the function, which prevent fine-grain specialisation
> at construction time. The same problem occurs with sequence types. I just
> need to figure out how to do it in javacc.
Could you elaborate this a bit more?
Thanks.
-- Santiago
Re: XPath API issues and plans
Posted by Lionel Villard <vi...@free.fr>.
There is no specific plan for implementing XPointer, but if someone
wants to take care of it, she/he's welcome!
Lionel
Richard Zschech wrote:
> This is a bit off topic but are there any plans for implementing the
> XPointer
> specs along side the xpath apis?
>
> Lionel Villard wrote:
>
>>
>>
>> Hi all,
>> I want to give you an overall of the remaining issues that
>> need to
>> be addressed to fulfill the XPath API requirements (in xstl20 branch
>> under
>> the xpath_rwapi directory). One of these requirements is to allow
>> several
>> applications to implement and/or reuse efficiently the XPath API and
>> many
>> problems need to be solved in order to reach it. Here the list of these
>> issues and also more general tasks to be done:
>>
>> XPath public API:
>>
>> - namespace/qname resolver : most of applications use a qname manager
>> for
>> example to share the same qname pool throughout their application.
>> Currently the public XPath API relies on the JAXP QName definition. I
>> want
>> to remove this dependency and to define a QName interface that
>> applications can implement within their QName manager.
>> - The same mecanism should be provided for the data model (sequence type
>> and item type).
>>
>> XPath API implementation:
>>
>> - Semantic analysis: currently no semantic analysis is performed.
>> Therefore the expression a/(43+23)/f is correctly parsed but an error
>> should be raised.
>> - An "optimization mode" should be provided. In this mode, only obvious
>> optimizations should be done, for example constant folding.
>>
>> Parser:
>>
>> - function call: right now, 'function call' AST nodes are created
>> without
>> knowing the name of the function, which prevent fine-grain
>> specialisation
>> at construction time. The same problem occurs with sequence types. I
>> just
>> need to figure out how to do it in javacc.
>>
>> - updates the XPath grammar. Not an issue, just a lot of work.
>>
>> That's it for now. Comments are greatly appreciated!
>>
>> Cheers,
>> Lionel Villard
>> IBM T.J Watson Research
>>
>> Lionel Villard
>> IBM T.J Watson
>
>
>
>
>
>
Re: XPath API issues and plans
Posted by Richard Zschech <ri...@cqrdata.com>.
This is a bit off topic but are there any plans for implementing the
XPointer
specs along side the xpath apis?
Lionel Villard wrote:
>
>
> Hi all,
> I want to give you an overall of the remaining issues that need to
> be addressed to fulfill the XPath API requirements (in xstl20 branch
> under
> the xpath_rwapi directory). One of these requirements is to allow several
> applications to implement and/or reuse efficiently the XPath API and many
> problems need to be solved in order to reach it. Here the list of these
> issues and also more general tasks to be done:
>
> XPath public API:
>
> - namespace/qname resolver : most of applications use a qname manager for
> example to share the same qname pool throughout their application.
> Currently the public XPath API relies on the JAXP QName definition. I
> want
> to remove this dependency and to define a QName interface that
> applications can implement within their QName manager.
> - The same mecanism should be provided for the data model (sequence type
> and item type).
>
> XPath API implementation:
>
> - Semantic analysis: currently no semantic analysis is performed.
> Therefore the expression a/(43+23)/f is correctly parsed but an error
> should be raised.
> - An "optimization mode" should be provided. In this mode, only obvious
> optimizations should be done, for example constant folding.
>
> Parser:
>
> - function call: right now, 'function call' AST nodes are created without
> knowing the name of the function, which prevent fine-grain specialisation
> at construction time. The same problem occurs with sequence types. I just
> need to figure out how to do it in javacc.
>
> - updates the XPath grammar. Not an issue, just a lot of work.
>
> That's it for now. Comments are greatly appreciated!
>
> Cheers,
> Lionel Villard
> IBM T.J Watson Research
>
> Lionel Villard
> IBM T.J Watson