<?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: Xpath support in Alfresco in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/xpath-support-in-alfresco/m-p/15868#M6992</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried replacing the &lt;/SPAN&gt;&lt;EM&gt;alf&lt;/EM&gt;&lt;SPAN&gt; with &lt;/SPAN&gt;&lt;EM&gt;cm&lt;/EM&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It does support more complex queries (from &lt;/SPAN&gt;&lt;A href="http://www.alfresco.org/forums/viewtopic.php?t=44" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/forums/viewtopic.php?t=44&lt;/A&gt;&lt;SPAN&gt;) e.g.:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;./*[@cm:name = 'someFolder' and subtypeOf('qname_of_folder')]/*[@cm:name = 'possibleOtherFolders' and subtypeOf('qname_of_folder')]/*[@cm:name = 'fileName' and subtypeOf('qname_of_file'))&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can even create your own functions by implementing org.jaxen.Function and then registering it with the XPathFunctionContext (see NodeServiceXPath).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jan 2006 16:53:46 GMT</pubDate>
    <dc:creator>rbramley</dc:creator>
    <dc:date>2006-01-27T16:53:46Z</dc:date>
    <item>
      <title>Xpath support in Alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/xpath-support-in-alfresco/m-p/15867#M6991</link>
      <description>Hello,To debug Alfresco XPath queries, I use the Node Browser.Simple queries work fine:./app:company_home/cm:folder1/cm:folder2/cm:file3‍But slightly complex ones seem not to be supported.For example, the following query:./*[@alf:name='myFile']‍returns a nice Search failed due to: java.lang.Unsuppor</description>
      <pubDate>Thu, 26 Jan 2006 17:03:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/xpath-support-in-alfresco/m-p/15867#M6991</guid>
      <dc:creator>greglenain</dc:creator>
      <dc:date>2006-01-26T17:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Xpath support in Alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/xpath-support-in-alfresco/m-p/15868#M6992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried replacing the &lt;/SPAN&gt;&lt;EM&gt;alf&lt;/EM&gt;&lt;SPAN&gt; with &lt;/SPAN&gt;&lt;EM&gt;cm&lt;/EM&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It does support more complex queries (from &lt;/SPAN&gt;&lt;A href="http://www.alfresco.org/forums/viewtopic.php?t=44" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/forums/viewtopic.php?t=44&lt;/A&gt;&lt;SPAN&gt;) e.g.:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;./*[@cm:name = 'someFolder' and subtypeOf('qname_of_folder')]/*[@cm:name = 'possibleOtherFolders' and subtypeOf('qname_of_folder')]/*[@cm:name = 'fileName' and subtypeOf('qname_of_file'))&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can even create your own functions by implementing org.jaxen.Function and then registering it with the XPathFunctionContext (see NodeServiceXPath).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2006 16:53:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/xpath-support-in-alfresco/m-p/15868#M6992</guid>
      <dc:creator>rbramley</dc:creator>
      <dc:date>2006-01-27T16:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Xpath support in Alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/xpath-support-in-alfresco/m-p/15869#M6993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've tried to replace the &lt;/SPAN&gt;&lt;EM&gt;alf&lt;/EM&gt;&lt;SPAN&gt; namespace with &lt;/SPAN&gt;&lt;EM&gt;cm&lt;/EM&gt;&lt;SPAN&gt;. It looks like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;./*[@cm:name = 'myFolder']/*[@cm:name = 'myFile.myExt']&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;But it still doesn't work (always the not-so-nice &lt;/SPAN&gt;&lt;SPAN style="color:red;"&gt;Search failed due to: java.lang.UnsupportedOperationException&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can the Node Browser really deal with the XPath syntax?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where to find examples of &lt;/SPAN&gt;&lt;EM&gt;org.jaxen.Function &lt;/EM&gt;&lt;SPAN&gt;and &lt;/SPAN&gt;&lt;EM&gt;XPathFunctionContext&lt;/EM&gt;&lt;SPAN&gt; implementations?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2006 13:57:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/xpath-support-in-alfresco/m-p/15869#M6993</guid>
      <dc:creator>greglenain</dc:creator>
      <dc:date>2006-02-03T13:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: Xpath support in Alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/xpath-support-in-alfresco/m-p/15870#M6994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There are two implementations of XPath support in Alfresco; the first is backed by Lucene, the second is backed by the NodeService.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The NodeService implementation provides much more XPath coverage than the Lucene implementation including Predicate support.&amp;nbsp; The UnsupportedOperationException is a weak message indicating the lack of Predicate support in the Lucene based implementation - I'm sure we'll implement that at some time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the NodeBrowser, you can select the kind of search to perform (one of noderef, xpath, lucene and selectnodes);&amp;nbsp; xpath = lucene based xpath, selectnodes = node service based xpath.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, you can perform the following search ./*[@cm:name='Company Home'] with selectnodes in the node browser.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Underneath, xpath maps to the SearchService.query(…, SearchService.LANGUAGE_XPATH, …) method and selectnodes maps to SearchService.selectNodes(…) method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2006 13:55:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/xpath-support-in-alfresco/m-p/15870#M6994</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2006-02-06T13:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Xpath support in Alfresco</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/xpath-support-in-alfresco/m-p/15871#M6995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Fine!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When processed with a node service based search (&lt;/SPAN&gt;&lt;EM&gt;selectnodes&lt;/EM&gt;&lt;SPAN&gt;), all the Xpath queries I struggled with are perfectly working on a V1.2RC1 repository.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Furthermore, to rename a folder no more prevents the query service from searching its descendants.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 18:42:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/xpath-support-in-alfresco/m-p/15871#M6995</guid>
      <dc:creator>greglenain</dc:creator>
      <dc:date>2006-02-08T18:42:19Z</dc:date>
    </item>
  </channel>
</rss>

