xsl-list
[Top] [All Lists]

Re: [xsl] xpath query failing

2016-04-22 15:29:24

On 22 Apr 2016, at 20:52, Joseph L. Casale 
jcasale(_at_)activenetwerx(_dot_)com 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

I'm afraid this is the number 1 xpath gotcha. Your nlog element is in a 
namespace and you are searching for nlog elements in no namespace.

The framework in which you are executing the XPath expression should give 
you some means of binding a prefix to the namespace, for example

setNamespaceBinding("n", "http://www.nlog-project.org/schemas/NLog.xsd";)

You can then use the path expression "/n:nlog/@throwExceptions"

Hi Michael,
Looks like I am out of luck, according to 
https://sourceforge.net/p/wix/bugs/2384/
the WIX toolset neglects to implement this functionality.


Well, there's always the ghastly workaround

"/*[local-name() = 'nlog']/@throwExceptions"

Over on xml-dev there are people actually defending the design of XML 
namespaces. Amazing.

Michael Kay
Saxonica
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>