XML::XPath functions
"Wayne Simmons" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
First post to this group so I hope I've directed it properly. I'm using XML:XPath and I find that functions will only evaluate if they're in a comparative expression. I'm using the path: //Apt[@AptCd='ORD']/local-name(..) to attempt to get a tag name. It works in Altova, but the XPath module dies with this error: Parse of expression //Apt[@AptCd='ORD']/local-name(..) failed - junk after end of expression: ( at C:/Perl/site/lib/XML/XPath/Parser.pm line 127. Which I read as "failed to understand local-name at end of path." When I test with something like: //Apt[@AptCd='ORD']/*[local-name(..)='Depart'] It parses (I know it returns different values than the previous one) so it obviously knows the function and understands what it does. I'm not sure if the XPath spec according to consortium says about this, but I was wondering if it's supposed to work this way and/or if it could be fixed. Without the ability to use functions as the last step in a path, it is impossible to get the tag name of a node. Any thoughts, is anyone working on this, or am I misunderstanding something/doing something wrong? Thanks in advance for any time you spend in replying. -Wayne Simmons -- Software Engineer InterSystems USA, Inc. 303-858-1000 _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs