<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Inspired? No &#187; XPath</title>
	<atom:link href="http://blog.inspired.no/category/xpath/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.inspired.no</link>
	<description>Espen Antonsen writes about the web</description>
	<lastBuildDate>Tue, 13 Jul 2010 11:31:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>SelectNodes in Mozilla</title>
		<link>http://blog.inspired.no/selectnodes-in-mozilla-215</link>
		<comments>http://blog.inspired.no/selectnodes-in-mozilla-215#comments</comments>
		<pubDate>Tue, 14 Nov 2006 14:07:00 +0000</pubDate>
		<dc:creator>Espen Antonsen</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XPath]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://inspired.goodcheapsleep.com/selectnodes-in-mozilla-215</guid>
		<description><![CDATA[The XML-DOM in IE includes selectNodes and selectSingleNode which is much easier to use than the equivalent x-path functions in Mozilla. To create a cross-browser solution that is based on the IE-syntax check out Simple Implementation of selectNodes() and selectSingleNode() for FireFox [Mozilla] with a script which works very good.Technorati: XML, XPath]]></description>
			<content:encoded><![CDATA[<p>The XML-DOM in IE includes selectNodes and selectSingleNode which is much easier to use than the equivalent x-path functions in Mozilla. To create a cross-browser solution that is based on the IE-syntax check out <a href="http://km0.la/js/mozXPath/">Simple Implementation of selectNodes() and selectSingleNode() for FireFox [Mozilla]</a> with a <a href="http://km0.la/js/mozXPath/mozxpath.js">script</a> which works very good.<br/><br/>Technorati: <a href="http://technorati.com/tag/XML" rel="tag">XML</a>, <a href="http://technorati.com/tag/XPath" rel="tag">XPath</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inspired.no/selectnodes-in-mozilla-215/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sum in XSLT</title>
		<link>http://blog.inspired.no/sum-in-xslt-150</link>
		<comments>http://blog.inspired.no/sum-in-xslt-150#comments</comments>
		<pubDate>Fri, 15 Jul 2005 12:35:00 +0000</pubDate>
		<dc:creator>Espen Antonsen</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[XPath]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://inspired.goodcheapsleep.com/sum-in-xslt-150</guid>
		<description><![CDATA[There is a lack of good quality XSLT resources on the web. Even simple tasks can be quite hard to find an answer to when trying to search. Most results are from newsgroups which is not always that relevant or self-explanatory. I will try to post some simple XSLT and X-Path tips every now and [...]]]></description>
			<content:encoded><![CDATA[<p>There is a lack of good quality XSLT resources on the web. Even simple tasks can be quite hard to find an answer to when trying to search. Most results are from newsgroups which is not always that relevant or self-explanatory. I will try to post some simple XSLT and X-Path tips every now and then.</p>
<p>This is how you do a simple sum in XSLT:</p>
<p>&lt;xsl:value-of select=&#8221;sum(XPATH)&#8221;/&gt;</p>
<p>If you want to sum all positive values:<br />
&lt;xsl:value-of select=&#8221;sum(//rs:data/z:row[@InvoiceOrderTotalWithTax &gt; 0]/@InvoiceOrderTotalWithTax)&#8221;&gt;</p>
<p>If you want to sum all negative values:<br />
&lt;xsl:value-of select=&#8221;sum(//rs:data/z:row[@InvoiceOrderTotalWithTax &lt; 0]/@InvoiceOrderTotalWithTax)&#8221;/&gt;</p>
<p>The xpath that is referred to here is generated from ADO.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inspired.no/sum-in-xslt-150/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SelectionLanguage Property &#8211; XPath in MSXML Parser 3.0</title>
		<link>http://blog.inspired.no/selectionlanguage-property-xpath-in-msxml-parser-30-94</link>
		<comments>http://blog.inspired.no/selectionlanguage-property-xpath-in-msxml-parser-30-94#comments</comments>
		<pubDate>Tue, 30 Nov 2004 10:20:00 +0000</pubDate>
		<dc:creator>Espen Antonsen</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[XPath]]></category>

		<guid isPermaLink="false">http://inspired.goodcheapsleep.com/selectionlanguage-property-xpath-in-msxml-parser-30-94</guid>
		<description><![CDATA[In MSXML 3.0 you can set this property to &#8220;XPath&#8221; to switch the query language from XSLPattern to XPath. Once the property is set, there is no way to switch back without creating an instance of a new DOM object.   xmldoc.setProperty("SelectionLanguage", "XPath"); // JScript xmldoc.setProperty "SelectionLanguage", "XPath" ' VBScript Second-level DOM Properties This caused [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>In MSXML 3.0 you can set this property to &#8220;XPath&#8221; to switch the query language from XSLPattern to XPath. Once the property is set, there is no way to switch back without creating an instance of a new DOM object.</p></blockquote>
<p> </p>
<pre>xmldoc.setProperty("SelectionLanguage", "XPath"); // JScript
xmldoc.setProperty "SelectionLanguage", "XPath"   ' VBScript</pre>
<p><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/xmpro2nd_selectionlanguage.asp">Second-level DOM Properties</a></p>
<p>This caused me many headaches until I found this solution. I have MSXML Parser 5.0 installed here (from Office 2003). Another colleague of mine encountered problems with the web-application I am currently developing. After some testing I noticed he had MSXML Parser 3.0 installed. A google search led me to <a href="http://www.devguy.com/fp/Tips/dom.htm">MSXML DOM Tips page</a> which revealed:</p>
<blockquote><p>If you want MSXML3 to use XPATH instead of &#8220;MS patterns&#8221; in methods like selectNodes, you need to set the SelectionLanguage  property</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.inspired.no/selectionlanguage-property-xpath-in-msxml-parser-30-94/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
