My favorites | Sign in
Project Logo
                
Details: Show all Hide all

Earlier this year

  • Oct 15, 2009
    GettingStarted Wiki page commented on by seanhodges84   -   @sumanmehtain - use a SAX parser for large XML content. XPath in general is not optimised for that purpose.
    @sumanmehtain - use a SAX parser for large XML content. XPath in general is not optimised for that purpose.
  • Oct 01, 2009
    GettingStarted Wiki page edited by peterjoel   -   Revision r56 Edited wiki page through web user interface.
    Revision r56 Edited wiki page through web user interface.
  • Oct 01, 2009
    GettingStarted Wiki page edited by peterjoel   -   Revision r55 Edited wiki page through web user interface.
    Revision r55 Edited wiki page through web user interface.
  • Oct 01, 2009
    GettingStarted Wiki page edited by peterjoel   -   Revision r54 Edited wiki page through web user interface.
    Revision r54 Edited wiki page through web user interface.
  • Sep 07, 2009
    r53 (added a protected copyProperties() method to XPathContext, t...) committed by peterjoel   -   added a protected copyProperties() method to XPathContext, to make it easier to extend (easier to implement copy() in subclasses)
    added a protected copyProperties() method to XPathContext, to make it easier to extend (easier to implement copy() in subclasses)
  • Aug 17, 2009
    issue 23 (Relative paths don't work when starting at the root node) Status changed by peterjoel   -  
    Status: Fixed
    Status: Fixed
  • Aug 17, 2009
    issue 23 (Relative paths don't work when starting at the root node) commented on by peterjoel   -   XPathQuery.exec() now accepts an optional second argument, startNode. If this is not set, it will be taken to be the same as the first argument UNLESS the first argument is the document root, in which case it will be the document wrapper.
    XPathQuery.exec() now accepts an optional second argument, startNode. If this is not set, it will be taken to be the same as the first argument UNLESS the first argument is the document root, in which case it will be the document wrapper.
  • Aug 17, 2009
    r52 (minor addition to unit test) committed by peterjoel   -   minor addition to unit test
    minor addition to unit test
  • Aug 17, 2009
    r51 (Issue #23 - API change to allow root node to be selected as ...) committed by peterjoel   -   Issue #23 - API change to allow root node to be selected as result of another expression and used as start node for a relative path
    Issue #23 - API change to allow root node to be selected as result of another expression and used as start node for a relative path
  • Aug 17, 2009
    issue 23 (Relative paths don't work when starting at the root node) reported by peterjoel   -   When you exec a path, it actually starts at an artificial wrapper node, that is created during the execution. This is because in XPath, the root node needs to be accessed with "/rootNodeName" not with "/" The only time that this causes a problem is when you use the result of one expression as the input of another, and that result happens to be the root node. What steps will reproduce the problem? 1. xml = <root name="root"><bar name="bar"/></root>; var node = new XPathQuery("/root").exec( xml ); var name = new XPathQuery("./@name").exec( node ); name will be "", while if the first expression selected <bar> then the name would be "bar", which is clearly not consistent. This is really a fact of life, but we can fix it for those times when you know it could happen, with an API change.
    When you exec a path, it actually starts at an artificial wrapper node, that is created during the execution. This is because in XPath, the root node needs to be accessed with "/rootNodeName" not with "/" The only time that this causes a problem is when you use the result of one expression as the input of another, and that result happens to be the root node. What steps will reproduce the problem? 1. xml = <root name="root"><bar name="bar"/></root>; var node = new XPathQuery("/root").exec( xml ); var name = new XPathQuery("./@name").exec( node ); name will be "", while if the first expression selected <bar> then the name would be "bar", which is clearly not consistent. This is really a fact of life, but we can fix it for those times when you know it could happen, with an API change.
  • Aug 17, 2009
    issue 21 (Problem Using Functions) Labels changed by peterjoel   -  
    Labels: Priority-Low Priority-Medium
    Labels: Priority-Low Priority-Medium
  • Jun 12, 2009
    issue 22 (Add a defaultNamespace property so you don't need to use a p...) reported by peterjoel   -   XPath.defaultNamespace lets you specify the namespace to use for names without a prefix. This is related to #16
    XPath.defaultNamespace lets you specify the namespace to use for names without a prefix. This is related to #16
  • Jun 12, 2009
    r50 (Added XPathContext.defaultNamespace property) committed by peterjoel   -   Added XPathContext.defaultNamespace property
    Added XPathContext.defaultNamespace property
  • Jun 02, 2009
    issue 21 (Problem Using Functions) changed by peterjoel   -   In XPath 2.0, built-in functions are held in a namespace with fn prefix, but this is not the case in XPath 1.0; they are not in any namespace. I'm in two minds about whether to support "forwards-compatibility" in this regard, by placing the built-in functions in both the default namespace and "fn". But I am going to change this issue to an enhancement request, to do just that, so it is tracked.
    Owner: peterjoel
    Labels: Type-Enhancement Type-Defect
    In XPath 2.0, built-in functions are held in a namespace with fn prefix, but this is not the case in XPath 1.0; they are not in any namespace. I'm in two minds about whether to support "forwards-compatibility" in this regard, by placing the built-in functions in both the default namespace and "fn". But I am going to change this issue to an enhancement request, to do just that, so it is tracked.
    Owner: peterjoel
    Labels: Type-Enhancement Type-Defect
  • May 28, 2009
    issue 21 (Problem Using Functions) commented on by Gavyn.Elrick   -   I retract my issue as 'count()' is the prompt term
    I retract my issue as 'count()' is the prompt term
  • May 28, 2009
    issue 21 (Problem Using Functions) commented on by Gavyn.Elrick   -   Basically just trying to call a count function to count how many of the node I am looking for are there. If you have made this use a different namespace instead of fn:count let me know because i am not sure how or if its possible in your current version.
    Basically just trying to call a count function to count how many of the node I am looking for are there. If you have made this use a different namespace instead of fn:count let me know because i am not sure how or if its possible in your current version.
  • May 28, 2009
    issue 21 (Problem Using Functions) commented on by Gavyn.Elrick   -   My mistake the error is Error: Some parsing went awry
    My mistake the error is Error: Some parsing went awry
  • May 28, 2009
    issue 21 (Problem Using Functions) reported by Gavyn.Elrick   -   What steps will reproduce the problem? 1. Simply use "fn:count(//love_element)" What is the expected output? What do you see instead? I am suppose to get back a total number of nodes What version of the product are you using? On what operating system? 1.0.0 vista Home Please provide any additional information below. Error: There is no namespace mapped to the prefix 'fn'.
    What steps will reproduce the problem? 1. Simply use "fn:count(//love_element)" What is the expected output? What do you see instead? I am suppose to get back a total number of nodes What version of the product are you using? On what operating system? 1.0.0 vista Home Please provide any additional information below. Error: There is no namespace mapped to the prefix 'fn'.
  • Apr 14, 2009
    issue 20 (*:* should be a syntax error) commented on by peterjoel   -   To clarify. According to the grammar, NameTest can be NCName:NCName or NCName:* The prefix can never be *.
    To clarify. According to the grammar, NameTest can be NCName:NCName or NCName:* The prefix can never be *.
  • Apr 14, 2009
    issue 6 (Utility method to build a path to a node) changed by peterjoel   -   I can see the code has been in there for some time (since 0.2.4)
    Status: Fixed
    Labels: Priority-Low Priority-Medium
    I can see the code has been in there for some time (since 0.2.4)
    Status: Fixed
    Labels: Priority-Low Priority-Medium
  • Apr 14, 2009
    issue 20 (*:* should be a syntax error) reported by peterjoel   -   *:* currently is implemented as "match any namespace, any local name". This is actually covered by * on its own, and *:* is not compliant with the grammar.
    *:* currently is implemented as "match any namespace, any local name". This is actually covered by * on its own, and *:* is not compliant with the grammar.
  • Apr 14, 2009
    10 issues changed by peterjoel   -   Issues 7, 8, 9, 10, 11, 12, 13, 14, 15, 17
    Issues 7, 8, 9, 10, 11, 12, 13, 14, 15, 17
  • Apr 11, 2009
    issue 19 (Wilcard operator should match any namespace) Status changed by peterjoel   -   Of other implementations that I found quickly online all of them treat "*" as meaning "any localName and any namespace". I used the expression "*/channel/title" in an rss document, that uses the rdf namespace in the root node, and all returned the correct node: http://www.mizar.dk/XPath/Default.aspx http://www.whitebeam.org/library/guide/TechNotes/xpathtestbed.rhtm http://ponderer.org/download/xpath/ http://www.zrinity.com/developers/xml/xpath/xpath.cfm (no support in the online tool for using namespaces, but "*/*[local-name()='channel']/*[local-name()='title']" worked) So... I've fixed this and it will be in the next release.
    Status: Fixed
    Of other implementations that I found quickly online all of them treat "*" as meaning "any localName and any namespace". I used the expression "*/channel/title" in an rss document, that uses the rdf namespace in the root node, and all returned the correct node: http://www.mizar.dk/XPath/Default.aspx http://www.whitebeam.org/library/guide/TechNotes/xpathtestbed.rhtm http://ponderer.org/download/xpath/ http://www.zrinity.com/developers/xml/xpath/xpath.cfm (no support in the online tool for using namespaces, but "*/*[local-name()='channel']/*[local-name()='title']" worked) So... I've fixed this and it will be in the next release.
    Status: Fixed
  • Apr 11, 2009
    r49 (Fix for issue #19) committed by peterjoel   -   Fix for issue #19
  • Apr 11, 2009
    issue 19 (Wilcard operator should match any namespace) commented on by peterjoel   -   The spec seems to lean towards * <==> *:* but it's not 100% clear. I am going to check against other implementation first.
    The spec seems to lean towards * <==> *:* but it's not 100% clear. I am going to check against other implementation first.
  • Apr 11, 2009
    issue 19 (Wilcard operator should match any namespace) reported by peterjoel   -   The W3C XPath 1.0 Spec says: A node test * is true for any node of the principal node type. And it has examples like: "@* selects all the attributes of the context node" "*/para selects all para grandchildren of the context node" "attribute::* will select all attributes of the context node" This suggests that * should actually be a synonym for *:*. In the current implementation, * will only match a node if: 1. The node is in no namespace, OR 2. The node is in the default namespace and the useSourceNamespacePrefixes is set to true. What steps will reproduce the problem? 1. 2. 3. What is the expected output? What do you see instead? Please use labels and text to provide additional information.
    The W3C XPath 1.0 Spec says: A node test * is true for any node of the principal node type. And it has examples like: "@* selects all the attributes of the context node" "*/para selects all para grandchildren of the context node" "attribute::* will select all attributes of the context node" This suggests that * should actually be a synonym for *:*. In the current implementation, * will only match a node if: 1. The node is in no namespace, OR 2. The node is in the default namespace and the useSourceNamespacePrefixes is set to true. What steps will reproduce the problem? 1. 2. 3. What is the expected output? What do you see instead? Please use labels and text to provide additional information.
  • Apr 11, 2009
    issue 2 (case conversion) Labels changed by peterjoel   -   I'm flagging this as part of a future optional extension, to include a subset XPath 2.0 functions.
    Labels: xpath2.0-extensions
    I'm flagging this as part of a future optional extension, to include a subset XPath 2.0 functions.
    Labels: xpath2.0-extensions
  • Apr 11, 2009
    issue 16 (Improved Namespace Processing) Status changed by peterjoel   -   I've added a flag, XPathContext.useSourceNamespacePrefixes, which defaults to false. Setting it to true will activate the feature and cause the source prefixes (and default namespaces) to be available to XPath. This will require some testing still. I've put a request in the forum for feedback also on the choice of name and default value.
    Status: Fixed
    I've added a flag, XPathContext.useSourceNamespacePrefixes, which defaults to false. Setting it to true will activate the feature and cause the source prefixes (and default namespaces) to be available to XPath. This will require some testing still. I've put a request in the forum for feedback also on the choice of name and default value.
    Status: Fixed
  • Apr 11, 2009
    r48 (Retrospectively tagging build 0.2.5) committed by peterjoel   -   Retrospectively tagging build 0.2.5
    Retrospectively tagging build 0.2.5
  • Apr 11, 2009
    r47 (retrospectively tagging build 0.2.4) committed by peterjoel   -   retrospectively tagging build 0.2.4
    retrospectively tagging build 0.2.4
  • Apr 11, 2009
    r46 (tagging the 1.0.0 build) committed by peterjoel   -   tagging the 1.0.0 build
    tagging the 1.0.0 build
  • Apr 10, 2009
    r45 (Fix for issue 16. Now namespace prefixes (and default namesp...) committed by peterjoel   -   Fix for issue 16 . Now namespace prefixes (and default namespace) can be picked up from the source XML by setting a flag (XPathContext.useSourceNamespacePrefixes)
    Fix for issue 16 . Now namespace prefixes (and default namespace) can be picked up from the source XML by setting a flag (XPathContext.useSourceNamespacePrefixes)
  • Apr 10, 2009
    issue 18 (Built-in XML namespace is not respected) Status changed by peterjoel   -   NameTest was checking the custom namespaces array directly, rather than calling XPathContext.getNamespaceURI(), so it missed the default namespaces. This will be in the next build.
    Status: Fixed
    NameTest was checking the custom namespaces array directly, rather than calling XPathContext.getNamespaceURI(), so it missed the default namespaces. This will be in the next build.
    Status: Fixed
  • Apr 10, 2009
    issue 18 (Built-in XML namespace is not respected) reported by peterjoel   -   In XML, the namespace prefix "xml" should be automatically mapped to "http://www.w3.org/XML/1998/namespace", but this mapping does not happen. Steps: 1. var xml:XML = <foo><a xml:id="1">a1</a><a xml:id="2">a2</a></foo>; var path:XPathQuery = new XPathQuery("//a[@xml:id='1']/text()"); trace(path.exec(xml)); What is the expected output? a1 What do you see instead? Error: There is no namespace mapped to the prefix 'xml'.
    In XML, the namespace prefix "xml" should be automatically mapped to "http://www.w3.org/XML/1998/namespace", but this mapping does not happen. Steps: 1. var xml:XML = <foo><a xml:id="1">a1</a><a xml:id="2">a2</a></foo>; var path:XPathQuery = new XPathQuery("//a[@xml:id='1']/text()"); trace(path.exec(xml)); What is the expected output? a1 What do you see instead? Error: There is no namespace mapped to the prefix 'xml'.
  • Apr 04, 2009
    issue 16 (Improved Namespace Processing) commented on by peterjoel   -   There is already a property XPathContext.openAllNamespaces, which does a part of this. In the version of the flash player that was current when this library was written, there was a problem with XML in AS3 where it renamed namespace prefixes internally. It meant you couldn't reliably get the original prefix, nor you tell which is the default namespace (ie no prefix). Since then, it seems to behave better, but I haven't had that officially confirmed, and I don't know exactly in which version of the Flash Player this can be depended upon. So I'm going to look into this and see if we can do something.
    There is already a property XPathContext.openAllNamespaces, which does a part of this. In the version of the flash player that was current when this library was written, there was a problem with XML in AS3 where it renamed namespace prefixes internally. It meant you couldn't reliably get the original prefix, nor you tell which is the default namespace (ie no prefix). Since then, it seems to behave better, but I haven't had that officially confirmed, and I don't know exactly in which version of the Flash Player this can be depended upon. So I'm going to look into this and see if we can do something.
  • Apr 04, 2009
    issue 16 (Improved Namespace Processing) changed by peterjoel   -  
    Status: Accepted
    Owner: peterjoel
    Labels: Type-Enhancement Type-Defect
    Status: Accepted
    Owner: peterjoel
    Labels: Type-Enhancement Type-Defect
  • Apr 04, 2009
    issue 17 (How to Install?) changed by peterjoel   -  
    Status: Invalid
    Labels: Type-Other Type-Defect Priority-Medium
    Status: Invalid
    Labels: Type-Other Type-Defect Priority-Medium
  • Apr 04, 2009
    issue 17 (How to Install?) commented on by peterjoel   -   This is the wrong place for this type of question - it's just for bugs or feature requests in the software. Please go to http://groups.google.com/group/xpath-as3?pli=1
    This is the wrong place for this type of question - it's just for bugs or feature requests in the software. Please go to http://groups.google.com/group/xpath-as3?pli=1
  • Mar 20, 2009
    issue 17 (How to Install?) reported by phreakhead   -   Hi, this sounds like exactly what I need, but I can't install it! What steps will reproduce the problem? 1. If I try to open the SWC file in Flash it says "cannot open this file", Extension Manager doesn't even let you click on it. 2. I then tried copying it into the /Users/[username]/Library/Application\ Support/Adobe/Flash\ CS3/en/Configuration/Components/ directory. 3. I start up Flash but it is not in the Components Panel, with either an Actionscript 3 or 2 FLA file open. What is the expected output? What do you see instead? It should install. There's not even a FLA file in the source! How am I suppposed to compile it? What version of the product are you using? On what operating system? Flash CS3 on OS X Tiger Please provide any additional information below.
    Hi, this sounds like exactly what I need, but I can't install it! What steps will reproduce the problem? 1. If I try to open the SWC file in Flash it says "cannot open this file", Extension Manager doesn't even let you click on it. 2. I then tried copying it into the /Users/[username]/Library/Application\ Support/Adobe/Flash\ CS3/en/Configuration/Components/ directory. 3. I start up Flash but it is not in the Components Panel, with either an Actionscript 3 or 2 FLA file open. What is the expected output? What do you see instead? It should install. There's not even a FLA file in the source! How am I suppposed to compile it? What version of the product are you using? On what operating system? Flash CS3 on OS X Tiger Please provide any additional information below.

Older

  • Sep 26, 2008
    issue 16 (Improved Namespace Processing) reported by clintdoriot   -   The library should automatically handle adding namespaces to the xpath context (at least as an option), including the use of a default namespace. The following xpath queries should work: "//link" - returns only <link> elements in the default namespace "//xh:link" - returns only <link> elements in the xhtml namespace "//*:link" - returns <link> elements from any namespace (As of xpath-as3 1.0, these namespaces must be set in an xpath context manually, and there is no default namespace) <feed xmlns="http://www.w3.org/2005/Atom" xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:os="http://a9.com/-/spec/opensearch/1.1/"> <updated>2008-09-26T09:37:23.51</updated> <title type="text">TcpConnection</title> <link href="http://10.20.8.123:8008/InfoItem/TcpConnection type="application/atom+xml" rel="self"/> <link href="/opensearchdescription.xml" type="application/opensearchdescription+xml" rel="search"/> <id>http://10.20.8.123:8008/InfoItem/TcpConnection</id> <link href="http://10.20.8.123:8008/InfoItem/TcpConnection?&amp;pw=2 type="application/atom+xml" rel="next"/> <os:totalResults>594</os:totalResults> <os:startIndex>1</os:startIndex> <os:itemsPerPage>50</os:itemsPerPage> <os:Query startPage="1" role="request"/> <entry>...</entry> </feed>
    The library should automatically handle adding namespaces to the xpath context (at least as an option), including the use of a default namespace. The following xpath queries should work: "//link" - returns only <link> elements in the default namespace "//xh:link" - returns only <link> elements in the xhtml namespace "//*:link" - returns <link> elements from any namespace (As of xpath-as3 1.0, these namespaces must be set in an xpath context manually, and there is no default namespace) <feed xmlns="http://www.w3.org/2005/Atom" xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:os="http://a9.com/-/spec/opensearch/1.1/"> <updated>2008-09-26T09:37:23.51</updated> <title type="text">TcpConnection</title> <link href="http://10.20.8.123:8008/InfoItem/TcpConnection type="application/atom+xml" rel="self"/> <link href="/opensearchdescription.xml" type="application/opensearchdescription+xml" rel="search"/> <id>http://10.20.8.123:8008/InfoItem/TcpConnection</id> <link href="http://10.20.8.123:8008/InfoItem/TcpConnection?&amp;pw=2 type="application/atom+xml" rel="next"/> <os:totalResults>594</os:totalResults> <os:startIndex>1</os:startIndex> <os:itemsPerPage>50</os:itemsPerPage> <os:Query startPage="1" role="request"/> <entry>...</entry> </feed>
  • Sep 25, 2008
    r44 committed by peterjoel
 
Hosted by Google Code