<?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 xPath explanation in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/xpath-explanation/m-p/208232#M161362</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all i have a little question that is a problem cause i really don't understand wht's worng.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm new and i'm try to develop an application that i want use in web environment. Using web services&amp;nbsp; i'd like to retrive document list in alfresco repository.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have this structure in Company Home:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;WiFi -&amp;gt; Retailers -&amp;gt; 999 -&amp;gt; Accounting. 999 are subspace of Retailers and so on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Using Query2 Sample (&lt;/SPAN&gt;&lt;A href="http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/sdk/samples/WebServiceSamples/source/org/alfresco/sample/webservice/Query2.java" rel="nofollow noopener noreferrer"&gt;http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/sdk/samples/WebServiceSamples/source/org/alfresco/sample/webservice/Query2.java&lt;/A&gt;&lt;SPAN&gt;) i define a variable STORE like new Store (Constants.WORKSPACE_STORE, "SpacesStore") and id liek to get reference to Accounting space using reference and repositoryservice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So i did….&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;…&lt;BR /&gt;String xpath = "app:/company_home/cm:WiFi/cm:999/*[@cm:name="Accounting"]";&lt;BR /&gt;Reference reference = new Reference(STORE, null, xpath);&lt;BR /&gt;Predicate predicate = new Prodicate(new Reference[]{reference}, null, null);&lt;BR /&gt;Node[] nodes = repositoryService.getPredicate(predicate);&lt;BR /&gt;…&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&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;SPAN&gt;At this point i get an exception Axis Fault….Error Executing xpath…RepositoryFault….&amp;nbsp; &lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But how can?? this is not the right way to use Xpath???&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thx for Help&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ema&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Mar 2009 15:05:57 GMT</pubDate>
    <dc:creator>mannobug</dc:creator>
    <dc:date>2009-03-12T15:05:57Z</dc:date>
    <item>
      <title>xPath explanation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/xpath-explanation/m-p/208232#M161362</link>
      <description>Hi all i have a little question that is a problem cause i really don't understand wht's worng.I'm new and i'm try to develop an application that i want use in web environment. Using web services&amp;nbsp; i'd like to retrive document list in alfresco repository.I have this structure in Company Home:WiFi -&amp;gt;</description>
      <pubDate>Thu, 12 Mar 2009 15:05:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/xpath-explanation/m-p/208232#M161362</guid>
      <dc:creator>mannobug</dc:creator>
      <dc:date>2009-03-12T15:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: xPath explanation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/xpath-explanation/m-p/208233#M161363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;….of ourse using // instead of /. The way to say descendant-or-self.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thx &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ema&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 15:25:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/xpath-explanation/m-p/208233#M161363</guid>
      <dc:creator>mannobug</dc:creator>
      <dc:date>2009-03-12T15:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: xPath explanation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/xpath-explanation/m-p/208234#M161364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;….well in fact using numbers in space's name result in strange behaviur. E.g.:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;with this xpath:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;app:/company_home/cm:WiFi/cm:User-999/cm:Accounting&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;SPAN&gt;it works, and wioth this one:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;app:/company_home/cm:WiFi/cm:999-User/cm:Accounting&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;SPAN&gt;it doesn't!(Obviusly changing name of the space during this test).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it a correct behaviour???&amp;nbsp; :? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ema&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 16:40:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/xpath-explanation/m-p/208234#M161364</guid>
      <dc:creator>mannobug</dc:creator>
      <dc:date>2009-03-12T16:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: xPath explanation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/xpath-explanation/m-p/208235#M161365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try using Query in the below format.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color:#FF0000;"&gt;Query query = new Query(Constants.QUERY_LANG_LUCENE, "+PATH:\"/app:company_home/cm:templates//*\" + @cm\\:name:*xml");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the above Query I'm searching for XML file in &lt;/SPAN&gt;&lt;SPAN style="color:#FF0000;"&gt;/app:company_home/cm:templates &lt;/SPAN&gt;&lt;SPAN&gt;space.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;More over you are using space which is starting with Number(999). First encode the folder/Filename which is starting with number or has spaces and then try quering the Alfresco.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For encoding use &lt;/SPAN&gt;&lt;SPAN style="color:#FF0000;"&gt;ISO9075.encode("999");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mahesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Mar 2009 17:12:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/xpath-explanation/m-p/208235#M161365</guid>
      <dc:creator>mahkath</dc:creator>
      <dc:date>2009-03-15T17:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: xPath explanation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/xpath-explanation/m-p/208236#M161366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi mahkath &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; thx for your reply…It works &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;ISO9075.encode("999");&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;and of course the query that you write.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ema&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2009 09:12:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/xpath-explanation/m-p/208236#M161366</guid>
      <dc:creator>mannobug</dc:creator>
      <dc:date>2009-03-16T09:12:14Z</dc:date>
    </item>
  </channel>
</rss>

