Re: [xml] Do patterns support namespaces ?



On 10/24/2011 12:14, Michael Ludwig wrote:
I still don't know what that --pattern switch is supposed to
do, but I cannot see how it is supposed to cope with namespace
prefixes;

"man xmllint" says:
--pattern PATTERNVALUE
Used to exercise the pattern recognition engine, which can be used with the reader interface to the parser. It allows to select some nodes in the document based on an XPath (subset) expression. Used for debugging.

So it's BASED on XPath, but doesn't support everything xpath does. Even if it was full XPath, there's no way to register a napespace prefix with it, so there would be no way to do a selection like "//a:b" via the --pattern switch.

Michael's suggestion is correct - this quick "pattern" test won't get you what you want, try a full program with registerNs to make the prefixes usable.

Jason




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]