id summary reporter owner description type status priority milestone component resolution keywords cc planetversion pltversion 303 xpath-parser.ss problem w/ abbreviated xpath syntax dmarshall207@… lizorkin "Hi, I'm somewhat new and did not notice the ticket feature so I sent this report in yesterday to email addresses listed in the source code. I thought I'd resend it here again as it's probably better protocol: subject : bug in xpath-parser.ss First, thank you for all the OS PLT-Scheme -- errr I mean, Racket code. I love this stuff. There seams to be a problem with some special cases for abbreviated xpath syntax -- looks like absolute paths have problems with xpaths that start with one of : ""div"", ""mod"", ""and"", ""or"". (could be that I just don't understand the specs) examples to illustrate : ;;---------------------------------------------------- ;; Works : (let*([data '(*TOP* (*PI* xml ""version='1.0'"") (one ""111"" (two ""222"")))]) (list (eval-xpath ""/one"" data) (eval-xpath ""/one/two"" data))) ;;---------------------------------------------------- ;; Fails : (let*([data '(*TOP* (*PI* xml ""version='1.0'"") (div ""111"" (two ""222"")))]) (eval-xpath ""/div"" data)) ;; Error Message : ;; XPath/XPointer parser error: unexpected end of XPath ;; expression. Expected - NCName procedure application: expected ;; procedure, given: #f; arguments were: (*TOP* (*PI* ;; xml ""version='1.0'"") (div ""111"" (two ""222""))) ;;---------------------------------------------------- ;; Fails : (let*([data '(*TOP* (*PI* xml ""version='1.0'"") (div ""111"" (two ""222"")))]) (eval-xpath ""/div/two"" data)) ;; Error Message : ;; /: division by zero ;;------------------------------------------------------------------ ;; Works : (let*([data '(*TOP* (*PI* xml ""version='1.0'"") (div ""111"" (two ""222"")))]) (list (eval-xpath ""div/two"" data) (eval-xpath ""/child::div"" data) (eval-xpath ""/child::div/two"" data))) Davis Marshall " defect new minor lizorkin/sxml.plt (2 1) 4.2.1.1