History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-737
Type: Bug Bug
Status: Resolved Resolved
Resolution: Duplicate
Priority: P1 P1
Assignee: André Bargull
Reporter: Benjamin Cox
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

XPath won't match attribute values with / in them.

Created: 25/Sep/05 12:00 PM   Updated: 18/May/08 06:32 PM
Component/s: LFC - Data
Affects Version/s: 3.0.2, RingDing (4.1)
Fix Version/s: 3.2 (Sage), RingDing (4.1)

Time Tracking:
Not Specified

File Attachments: 1. File urlXPathProblem.lzx (0.9 kb)


Severity: Major
Platform: All
Runtime: SWF7


 Description  « Hide
When I load an XML document whose elements contain attributes with URIs as values, the Laszlo XPath implementation can't match the element with "elementName[@attrName='URI']" unless the URI doesn't contain any forward slashes (which never happens). This is a _big_ issue when using Semantic Web technologies, where all 'object ids' are actually URIs.

See the attached urlXPathProblem.lzx file for a test case.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Benjamin Cox - 25/Sep/05 12:01 PM
Attached test case "urlXPathProblem.lzx"

Jim Grandy - 08/Nov/05 03:33 PM
Added unit test //depot/lps-dev/test/bugs/lpp-737.lzx

Max Carlson - 25/Jan/06 04:56 PM
Also fixes Jim's testcase for hadling escaped strings, e.g. \' -> '. Checked in lzunit test at //depot/lps-dev/test/lfc/data/lzunit-lzparsedpath.lzx#1

Mark Davis - 22/Mar/06 07:09 PM
all tests pass now

André Bargull - 20/Mar/08 02:57 PM
testcase does not work, string literal can start with a single-quote or a double-quote!

---
<canvas debug="true" >
  
    <dataset name="mydata">
        <record uri="http://www.google.com">Slashes text</record>
        <record uri="http:www.google.com">No-slashes text</record>
    </dataset>

    <simplelayout spacing="5"/>

    <!-- does work -->
    <text bgcolor="0xeaeaea" >double-single-double</text>
    <text x="10" datapath="mydata:/record[@uri='http://www.google.com']/@uri" />
    
    <!-- does not work! -->
    <text bgcolor="0xeaeaea" >single-double-single</text>
    <text x="10" datapath='mydata:/record[@uri="http://www.google.com"]/@uri' />
    
    <!-- this works, too -->
    <text bgcolor="0xeaeaea" >just a test</text>
    <text x="10" datapath='mydata:/record[@uri="http:www.google.com"]/@uri' />
</canvas>
---

Amy Muntz - 18/May/08 06:32 PM
This is being handled (the remaining issues) in LPP-5648. See comments in LPP-5648