ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kasun Gajasinghe (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIOM-271) Extend AXIOMXPath with a method that will return a node that does not exist for the given xpath
Date Fri, 17 Feb 2012 06:32:00 GMT

    [ https://issues.apache.org/jira/browse/AXIOM-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210099#comment-13210099
] 

Kasun Gajasinghe commented on AXIOM-271:
----------------------------------------

This is a very useful feature. Sad to see it haven't become part of Axiom API yet.

Now, to defend some of the arguments; Here, the same expression haven't parsed twice. Only
a part of the expression (ie. xpath to parent element) is parsed at the second time. So, this
implementation isn't that bad compared to its usefulness?

I'm just a novice user to jaxen and xpath in general. But looking at this, may be a better
way to do this is to manipulate the document using org.jaxen.expr.Expr which returns AST (Abstract
Syntax Tree) of the XPath? That way, we can precisely find the parent of the given node/s.


It's so not good let the users worry about creating parent nodes because xpath syntax has
some complexity. For example, as I understood, a xpath may use '..' to refer to parent. ex.
/Persons/Person/.. is equal to /Persons. So, these needs to be taken into account.
Much like to see this in a near future release. I wish I knew ins-and-outs of Jaxen such that
I could contribute a patch! :)

Thanks.
                
> Extend AXIOMXPath with a method that will return a node that does not exist for the given
xpath
> -----------------------------------------------------------------------------------------------
>
>                 Key: AXIOM-271
>                 URL: https://issues.apache.org/jira/browse/AXIOM-271
>             Project: Axiom
>          Issue Type: New Feature
>            Reporter: Thorsten Scherler
>         Attachments: AXIOMXPathPatched.java, WSCOMMONS-389.txt
>
>
> http://markmail.org/message/qv7ksjgqa6j6je4c
> I needed a method that will create the underlying OM structure for a xpath that does
not yet exists.
> Well much like: http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/xml/dom/DOMUtil.html#selectSingleNode(org.w3c.dom.Node,
> java.lang.String, org.apache.excalibur.xml.xpath.XPathProcessor) but only for Axiom.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


Mime
View raw message