<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to use XPath expression in Edit APP source in _ufe element? in Arbortext</title>
    <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/492571#M31204</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Gareth, thanks for your tip,&amp;nbsp; I checked the expression and it returns correct value (e.g. in generated text). But whenever I use it in the APP source edit it doesn't work. The colour of the text is stil in black or it doesn't appear at all.&lt;/P&gt;
&lt;P&gt;Jana&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="XPath in APP source.png" style="width: 846px;"&gt;&lt;img src="https://community.ptc.com/t5/image/serverpage/image-id/3328i902A18957267F590/image-size/large?v=v2&amp;amp;px=999" role="button" title="XPath in APP source.png" alt="XPath in APP source.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Nov 2017 11:25:19 GMT</pubDate>
    <dc:creator>jhubackova</dc:creator>
    <dc:date>2017-11-27T11:25:19Z</dc:date>
    <item>
      <title>How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/492389#M31198</link>
      <description>&lt;P&gt;Hello, I want to use _ufe element with universal definition of the colour. &lt;BR /&gt;The actual colour will be set in the xml document, e.g. in the &amp;lt;productname&amp;gt; element and his "role" attribute.&lt;/P&gt;
&lt;P&gt;I changed the APP source for _ufe by this way:&lt;/P&gt;
&lt;P&gt;...&lt;BR /&gt;//var color_value = '#0c6979';&lt;BR /&gt;var color_value = formating.evaluateXPath("//productname/@role");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;// Print/PDF properties&lt;BR /&gt;style.color = ( color_value )&lt;BR /&gt;...&lt;/P&gt;
&lt;P&gt;but it doesnť work. Maybe the &lt;SPAN&gt;formating.evaluateXPath function&lt;/SPAN&gt; doesn't return a string value?&lt;BR /&gt;The attempt with the direct setting of the color (a commented row) works OK.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for help&lt;/P&gt;
&lt;P&gt;Jana&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2017 16:15:05 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/492389#M31198</guid>
      <dc:creator>jhubackova</dc:creator>
      <dc:date>2017-11-23T16:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/492477#M31202</link>
      <description>&lt;P&gt;You will need to read the FOM documents to get the exact return values, although I&amp;nbsp;think&amp;nbsp;formatting.evaluateXPath()&amp;nbsp;should&amp;nbsp;return a string. The&amp;nbsp;fxDocument (DOM) version of evaluateXPath certainly returns an object though. Your code otherwise looks mostly fine and should do what you're after.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideas:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Check what the result string is: formatting.write( formatting.evaluteXPath("/whatever") );&lt;/LI&gt;
&lt;LI&gt;Don't use // at the start of an XPath expression. This causes the formatter to search the *entire* document everytime and slows formatting/printing down. Instead you should use a direct path e.g. /document/path/to/productname/@role&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Fri, 24 Nov 2017 19:01:05 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/492477#M31202</guid>
      <dc:creator>GarethOakes</dc:creator>
      <dc:date>2017-11-24T19:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/492571#M31204</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Gareth, thanks for your tip,&amp;nbsp; I checked the expression and it returns correct value (e.g. in generated text). But whenever I use it in the APP source edit it doesn't work. The colour of the text is stil in black or it doesn't appear at all.&lt;/P&gt;
&lt;P&gt;Jana&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="XPath in APP source.png" style="width: 846px;"&gt;&lt;img src="https://community.ptc.com/t5/image/serverpage/image-id/3328i902A18957267F590/image-size/large?v=v2&amp;amp;px=999" role="button" title="XPath in APP source.png" alt="XPath in APP source.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 11:25:19 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/492571#M31204</guid>
      <dc:creator>jhubackova</dc:creator>
      <dc:date>2017-11-27T11:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/492649#M31206</link>
      <description>&lt;P&gt;Hello, I found the different behaviour - whenever I use this _ufe element (with xpath expression) in the common text it works correctly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But when I use this same _ufe element&amp;nbsp; in the "Generated Contents" in the Page Region (and it is area when I need it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; it doesn't work at all.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have any idea how to solve it?&amp;nbsp; Sorry I'm not very skill in FOM/DOM syntaxe ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp; Jana&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 17:28:53 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/492649#M31206</guid>
      <dc:creator>jhubackova</dc:creator>
      <dc:date>2017-11-27T17:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/492671#M31207</link>
      <description>&lt;P&gt;I haven't done this for a while, but there always used to be problems with XPath in generated content. Essentially the XPath couldn't properly "see" the document tree when running inside the generated content.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are a couple of solutions:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Store the colour value in a variable and use it later on&lt;/LI&gt;
&lt;LI&gt;Try prepending xml0# to the XPath&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;For #1, you would have to add a source edit in the root element to save the colour value. e.g. application.variables.myColour = formatting.evaluteXPath("/my/xpath"); Then you can use application.variables.myColour in your generated content source edit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For #2, we're trying to trick APP to "see" the correct XML stream. The in-memory APP document will have a number of streams (headers, footers, and main text). The main text used to be called "xml0" hence the special syntax to direct the XPath to the correct location. e.g. formatting.evaluateXPath("xml0#/my/xpath");&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 21:58:24 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/492671#M31207</guid>
      <dc:creator>GarethOakes</dc:creator>
      <dc:date>2017-11-27T21:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/492872#M31211</link>
      <description>&lt;P&gt;Hi Gareth, many thanks,&amp;nbsp; #1 solution (application.variables) works perfect for the Generated Content in the title page!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to test also your #2 tip by using XML streams.&lt;/P&gt;
&lt;P&gt;But I donť know how to find out the correct number of the stream for the using in my XPath expression?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;J.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 10:28:15 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/492872#M31211</guid>
      <dc:creator>jhubackova</dc:creator>
      <dc:date>2017-11-29T10:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/493041#M31213</link>
      <description>&lt;P&gt;Yes this isn't particularly obvious or easy to get to. The most straightforward way would be to use the Styler option that lets you save a .3D file to disk. The .3D file&amp;nbsp;is an intermediate format that contains the complete set of content and styling used to produce the PDF. You can then open the .3D file in a text editor (e.g. Notepad++) and find all the stream definitions (fdt "streamName"). If you spend five minutes poking around in that file it should be pretty obvious which one is the main content stream.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 22:02:48 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/493041#M31213</guid>
      <dc:creator>GarethOakes</dc:creator>
      <dc:date>2017-11-29T22:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/498571#M31280</link>
      <description>&lt;P&gt;Hi Gareth,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also ran into same situation as Jana. I have used solution #1 and did work, but I would like to try solution #2 as well. The difference is that i would like to use an XPath function like count() within the XPath expression.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried the following with no success:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var NoPubs = formatting.evaluateXPath("count(xml0#//chghistory/chginfo) + 1");&lt;/P&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;P&gt;var NoPubs = formatting.evaluateXPath("count(xml0#/chghistory/chginfo) + 1");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;document root is &amp;lt;doc&amp;gt;, and the absolute path to the nodeset&amp;nbsp; is doc/docwp/front/idinfo.&lt;/P&gt;
&lt;P&gt;What i am doing wrong?&lt;/P&gt;
&lt;P&gt;I would appreciate any help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Florin&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 20:48:59 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/498571#M31280</guid>
      <dc:creator>otudor</dc:creator>
      <dc:date>2018-01-24T20:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/498829#M31281</link>
      <description>&lt;P&gt;Start with a simple expression and grow from there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;formatting.evaluateXPath("count(/doc)"); // should return "1", unless your XPath context is not the main stream&lt;/P&gt;
&lt;P&gt;formatting.evaluateXPath("count(xml0#/doc)"); // should return "1", forcing XPath context to main stream&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If neither of the above are working then you will need to figure out what the main stream name is, by opening a .3D file and inspecting with a text editor. Sorry but I haven't done this for a few years now so I'm not up to date on exact stream names and things.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 00:12:01 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/498829#M31281</guid>
      <dc:creator>GarethOakes</dc:creator>
      <dc:date>2018-01-25T00:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/498946#M31282</link>
      <description>&lt;P&gt;Hi Gareth,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It did not work, most likely because the xml0# is not the main stream name.&lt;/P&gt;
&lt;P&gt;I never used (create, access, or access) a .3d file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help to get #2 working is appreciated. like I said #1 works just fine but now you made me curios how #2 can be implemented.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Florin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 16:49:04 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/498946#M31282</guid>
      <dc:creator>otudor</dc:creator>
      <dc:date>2018-01-25T16:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/499038#M31283</link>
      <description>&lt;P&gt;Hi Florin, the .3d file you can create by these steps: from Styler menu - Preview - Print - and then from APP Preview window - File - Save APP File.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But despite Gareth's instruction I was not able to find the correct XML stream for the #2 solution, so I used the #1 one. Anyway I'm interested if you will be more successful. If so, post your method.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks Jana&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2018 07:28:38 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/499038#M31283</guid>
      <dc:creator>jhubackova</dc:creator>
      <dc:date>2018-01-26T07:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/499120#M31284</link>
      <description>&lt;P&gt;Hi Gareth,&lt;/P&gt;
&lt;P&gt;Followed Jana's instructions to create the .3d file, thank you Jana, and I did poke around with the file looking for all (1657) fdt "name" that could resemble anything close to a stream name but with no success.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, poking around I found something that caught my eye, namely this lines&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$template.primaryStream = 'editorDom0';&lt;/P&gt;
&lt;P&gt;$application.variables['_x_primaryStream'] = 'editorDom0';&lt;/P&gt;
&lt;P&gt;under the following fdt line, fdt "autoexec",90,"",0,"";;4.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried all the following with no success:&lt;/P&gt;
&lt;P&gt;formatting.evaluateXPath("count(editorDom0#//doc")&lt;/P&gt;
&lt;P&gt;formatting.evaluateXPath("count(editorDom0#/doc")&lt;/P&gt;
&lt;P&gt;formatting.evaluateXPath("count(editorDom0//doc")&lt;/P&gt;
&lt;P&gt;formatting.evaluateXPath("count(editorDom0/doc")&lt;/P&gt;
&lt;P&gt;and that made me think that editorDom0 is not the main stream I am looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I still want to get this solution working because more direct (1 step deal) than the second solution which uses two step process. Like I said #1 work just fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Am I looking at the wrong thing? Any other suggestion or tip?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a blessed day!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Florin&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2018 19:52:35 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/499120#M31284</guid>
      <dc:creator>otudor</dc:creator>
      <dc:date>2018-01-26T19:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/499297#M31286</link>
      <description>&lt;P&gt;You're correct it is "editorDom0" that is the main stream for Styler-generated the .3D files. I had forgotten. I tested in a standalone .3D file and the syntax formatting.evaluateXPath("editorDom0#/doc"); is the correct one. Perhaps you should raise this with PTC support for further assistance.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jan 2018 21:43:35 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/499297#M31286</guid>
      <dc:creator>GarethOakes</dc:creator>
      <dc:date>2018-01-28T21:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/499353#M31287</link>
      <description>&lt;P&gt;Hi Gareth,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After posting the previous post I kept poking around with the .3d file and I found the following peace of code (changes are obvious :)) that confirms that editorDom0 is the main stream:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var florin = content.getStream(template.primaryStream);&lt;/P&gt;
&lt;P&gt;application.alert("steram name: " + florin.name);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which produces the attached result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now that Gareth confirmed too that editorDom0 is the main stream I will try again to evaluate the XPath, and if does not work I will reach PTC like Gareth suggested.&lt;/P&gt;
&lt;P&gt;Jana, you can also try it and see what results are you getting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Florin&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 15:10:06 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/499353#M31287</guid>
      <dc:creator>otudor</dc:creator>
      <dc:date>2018-01-29T15:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/535782#M31316</link>
      <description>&lt;P&gt;Hi Florin,&amp;nbsp; here is one PTC Article concerning our thema &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.ptc.com/en/support/article?n=CS22760" target="_blank"&gt;https://www.ptc.com/en/support/article?n=CS22760&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;They use this trick:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Change:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;if ( formatting.evaluateXPath( "@xml:lang = 'ja'", "1if1" ) != 0 )&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;To:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;if ( formatting.evaluateXPath( "editorDom0#boolean( /RDStyle/ResolvedMap/shopmanualmap/@xml:lang = 'ja')", "1if1" ) != 0 )&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 10:05:23 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/535782#M31316</guid>
      <dc:creator>jhubackova</dc:creator>
      <dc:date>2018-02-16T10:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/535827#M31319</link>
      <description>&lt;P&gt;Hi Jana,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for pointing me in the right direction. After I tried to see what makes sens for me from all that, I came up with following syntax that did work for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking for text() node:&lt;/P&gt;
&lt;PRE&gt;formatting.evaluateXPath("editorDom0#//your/XPath/expression/here/text()", "1if1"));
&lt;/PRE&gt;
&lt;P&gt;Using an XPath function:&lt;/P&gt;
&lt;PRE&gt;formatting.evaluateXPath("editorDom0#count(//your/XPath/expression/here)", "1if1"));&lt;/PRE&gt;
&lt;P&gt;Important notes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. I have tried "editorDom#&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;/&lt;/FONT&gt;&lt;/STRONG&gt;your/XPath/expression/here" with one forward slash instead of two forward slashes in the XPath expression and &lt;FONT color="#FF0000"&gt;did not work&lt;FONT color="#000000"&gt;. I know, I know... PTC recommends not to use double forward slashes in a XPath expression because slows down the process, and I kind of agree with that, but this is my finding for now. Gareth, any input?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;2. Another finding is that the above expressions won't give the expected result without the second parameter "1if1", which to be honest I do not know what it means and/or what it does. Gareth, any input? So do not forget to add "1if1" as a second parameter for evaluateXPath() function. I have looked up in PTC Help, and evaluateXPath() function in fFormatting interface takes only an &lt;FONT color="#00CCFF"&gt;&lt;EM&gt;expression&lt;/EM&gt; &lt;/FONT&gt;parameter, not two.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;Thank you again Gareth and Jana to help me get this much more elegant solution to work.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;Have a blessed day!&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;Florin&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 17:02:40 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/535827#M31319</guid>
      <dc:creator>otudor</dc:creator>
      <dc:date>2018-02-16T17:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to use XPath expression in Edit APP source in _ufe element?</title>
      <link>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/535951#M31320</link>
      <description>&lt;P&gt;1. I think the problem is that what you're styling isn't what you expect. Note in that PTC Article there is a /RDStyle/... in the path, that is why you need double-slash so it navigates past that extra element. The problem with // is that it will slow your publishing down - it forces APP to visit every node in the entire document each time that XPath is evaluated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. I have no idea about "1if1", this is the first time I've ever seen that syntax.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Feb 2018 22:18:37 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Arbortext/How-to-use-XPath-expression-in-Edit-APP-source-in-ufe-element/m-p/535951#M31320</guid>
      <dc:creator>GarethOakes</dc:creator>
      <dc:date>2018-02-18T22:18:37Z</dc:date>
    </item>
  </channel>
</rss>

