<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Rules - Path Problem</title><link>https://www.infopathdev.com:443/forums/thread/42813.aspx</link><pubDate>Thu, 11 Jun 2009 21:34:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42813</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42813.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=42813</wfw:commentRss><description>&lt;p&gt;Thanks for posting! :)&lt;/p&gt;</description></item><item><title>Rules - Path Problem</title><link>https://www.infopathdev.com:443/forums/thread/42699.aspx</link><pubDate>Wed, 10 Jun 2009 13:42:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42699</guid><dc:creator>HttpPointCom</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42699.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=42699</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi,&lt;/p&gt;&lt;p&gt;&amp;nbsp;I use the program of alec polidaev which calculate workday between 2 datepicker with rules only ( you can download the form here : http://cid-e5a123fca40349ad.skydrive.live.com/self.aspx/.Public/WorkDaysCalc.xsn?sa=433793328 )&lt;/p&gt;&lt;p&gt;so i&amp;#39;ve a xml file(name = daysOfTheWeek) in data connection for receive the holidays. the problem is on a rule for the workday field,&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;the rule is :&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;compte(hday[traduire(BeginDate; &amp;quot;-&amp;quot;; &amp;quot;&amp;quot;) &amp;lt;= traduire(@hdayn; &amp;quot;-&amp;quot;; &amp;quot;&amp;quot;) and traduire(EndDate; &amp;quot;-&amp;quot;; &amp;quot;&amp;quot;) &amp;gt;= traduire(@hdayn; &amp;quot;-&amp;quot;; &amp;quot;&amp;quot;)]) &lt;/b&gt;&lt;/p&gt;&lt;p&gt;path : hday -&amp;gt; &lt;span&gt;xdXDocument:getDOM(&amp;quot;daysOfTheWeek&amp;quot;)/somestuff/holydays/hday&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BeginDate -&amp;gt;/my:myFields/my:BeginDate&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; EndDate -&amp;gt;/my:myFields/EndDate&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; @hdayn-&amp;gt; &lt;span&gt;traduire(xdXDocument:getDOM(&amp;quot;daysOfTheWeek&amp;quot;)/somestuff/holydays/hday/@hdayn&lt;/span&gt;&lt;/p&gt;&lt;p&gt;alec&amp;#39;s form works well but if i delete this line and rewrite it, it doesn&amp;#39;t count the holiday in workday calculation the problems are : If you add hday,BeginDate,@hdayn,EndDate with infopath IU --&amp;gt; error because the form act like BeginDate is in this path if you add hday,BeginDate,@hdayn,EndDate with path like this&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;b&gt;compte(xdXDocument:getDOM(&amp;quot;JourSemaine&amp;quot;)/somestuff/holydays/hday[traduire(/my:DemandeConge/my:Congés/my:DateDebut;
&amp;quot;-&amp;quot;; &amp;quot;&amp;quot;) &amp;lt;=
traduire(xdXDocument:getDOM(&amp;quot;JourSemaine&amp;quot;)/somestuff/holydays/hday/@hdayn;
&amp;quot;-&amp;quot;; &amp;quot;&amp;quot;) and
traduire(/my:DemandeConge/my:Congés/my:DateFin; &amp;quot;-&amp;quot;; &amp;quot;&amp;quot;)
&amp;gt;= traduire(xdXDocument:getDOM(&amp;quot;JourSemaine&amp;quot;)/somestuff/holydays/hday/@hdayn;
&amp;quot;-&amp;quot;; &amp;quot;&amp;quot;)])&lt;/b&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;&lt;p&gt;there is no error detected but the holidays aren&amp;#39;t count into workday calculation so my question is what i&amp;#39;m doing wrong in reproducing &lt;/p&gt;&lt;p&gt;&lt;b&gt;compte(hday[traduiree(BeginDate; &amp;quot;-&amp;quot;; &amp;quot;&amp;quot;) &amp;lt;= traduire(@hdayn; &amp;quot;-&amp;quot;;
&amp;quot;&amp;quot;) and traduire(EndDate; &amp;quot;-&amp;quot;; &amp;quot;&amp;quot;) &amp;gt;= traduire(@hdayn; &amp;quot;-&amp;quot;; &amp;quot;&amp;quot;)]) &lt;/b&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks in advance&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Edit : Alec responded me in his blog, for who wonder here is the solution :&lt;/p&gt;&lt;p&gt;&lt;b&gt;count(xdXDocument:GetDOM(”daysOfTheWeek”)/somestuff/holydays/hday[translate(xdXDocument:get-DOM()/my:myFields/my:BeginDate,
&amp;quot;-&amp;quot;, &amp;quot;&amp;quot;) &amp;lt;= translate(@hdayn, &amp;quot;-&amp;quot;, &amp;quot;&amp;quot;) and
translate(xdXDocument:get-DOM()/my:myFields/my:EndDate, &amp;quot;-&amp;quot;, &amp;quot;&amp;quot;) &amp;gt;=
translate(@hdayn, &amp;quot;-&amp;quot;, &amp;quot;&amp;quot;)])&lt;/b&gt; &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>