jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Heß <peter.hess....@gbtec.de>
Subject Can't get CustomNode with XPATH
Date Sat, 16 Feb 2008 23:54:45 GMT

Hello,

since days I fight with following problem:

// result is correct
xpath = "/jcr:root/News//*[@jcr:primaryType='lhc:news']";
list = ...
assertEquals(20, list.size());

-> This is OK
 20 Nodes of type lhc:news


xpath = "/jcr:root/News//element(*)";
list = ...
assertEquals(20, list.size());

-> This is OK
 20 Nodes of type lhc:news

but now:

xpath = "/jcr:root/News//element(*,lhc:news)";
list = itsCmsBicDocumentCustomizedManager.getUuidsByXpath(xpath);
// size = 0

-> This is not OK: no nodes will be found.

Im not shure what is going on. 

The same with SQL:

String sql="select * from nt:base";
list = itsCmsBicDocumentCustomizedManager.getUuidsBySql(sql);
-> I've checked the list. Inside there a 20 nodes with type lhc:news (total
more than 150)

and now:
sql="select * from lhc:news";
list = itsCmsBicDocumentCustomizedManager.getUuidsBySql(sql);
-> 0 nodes in list

I use 1.3.3. Everthings works fine, except this query and all other queries
with this (and other) custom nodes.

Here's the definition of the custom node:

<jcr='http://www.jcp.org/jcr/1.0'>
<nt='http://www.jcp.org/jcr/nt/1.0'>
<mix='http://www.jcp.org/jcr/mix/1.0'>
<bicdoc = 'http://www....'>
<lhc = 'http://www.......'>

[bicdoc:extendedProperties] > nt:unstructured
[bicdoc:metaData] > nt:unstructured
[bicdoc:properties] > nt:unstructured
[bicdoc:foreignMetaData] > nt:unstructured
  + * (bicdoc:metaData) version

[bicdoc:file] > nt:file
  - bicdoc:versionCounter (long) mandatory version
  + * (bicdoc:extendedProperties) version

[bicdoc:folder] > nt:folder, mix:referenceable mixin orderable
  - jcr:lastModified (date) mandatory version
  - bicdoc:versionCounter (long) version
  - acl (undefined) version multiple
  + foreignMetaData (bicdoc:foreignMetaData) version
  + * (bicdoc:file) version
  + * (bicdoc:folder) version
  + * (bicdoc:content) version

[bicdoc:content] > bicdoc:folder, mix:referenceable mixin orderable
  - * (undefined) version

[lhc:news] > bicdoc:folder, mix:referenceable mixin orderable
  - * (undefined) version
  - subCategories (reference) multiple

[lhc:newsfolder] > bicdoc:folder, mix:referenceable mixin orderable
  + * (lhc:news) version

------------------------------------

I'm have no idea

/jcr:root/News//*[@jcr:primaryType='lhc:news']

works. So this means, that the custom node is registered and accessable. but
this does not /jcr:root/News//element(*,lhc:news). Here's my repository.xml

----


<?xml version="1.0" encoding="ISO-8859-1"?>
<Repository>
	<FileSystem
		class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
		
	</FileSystem>

	<Security appName="Jackrabbit">
		<AccessManager
			class="org.apache.jackrabbit.core.security.SimpleAccessManager" />
		<LoginModule
			class="org.apache.jackrabbit.core.security.SimpleLoginModule" />
	</Security>

	<Workspaces rootPath="d:/opt/bicdocument/....."
		defaultWorkspace="workspaces" />

	<Workspace name="${wsp.name}">
		<FileSystem
			class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
			
		</FileSystem>

		<PersistenceManager
		
class="org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenceManager">
			
			
			
			

		</PersistenceManager>
		<SearchIndex
			class="org.apache.jackrabbit.core.query.lucene.SearchIndex">

			
			
			
			
			
			
			
			
			
			
			
			<!--
				Jackrabbit 1.3
http://jackrabbit.apache.org/doc/components/text-extractors.html
				Microsoft Word [org.apache.jackrabbit.extractor.MsWordTextExtractor]
				application/vnd.ms-word
				application/msword
				Microsoft Excel [org.apache.jackrabbit.extractor.MsExcelTextExtractor]
				application/vnd.ms-excel
				Microsoft PowerPoint
[org.apache.jackrabbit.extractor.MsPowerPointTextExtractor]
				application/vnd.ms-powerpoint
				application/mspowerpoint
				Portable Document Format (PDF)
[org.apache.jackrabbit.extractor.PdfTextExtractor]
				application/pdf
				OpenOffice.org [org.apache.jackrabbit.extractor.OpenOfficeTextExtractor]
				application/vnd.oasis.opendocument.database
				application/vnd.oasis.opendocument.formula
				application/vnd.oasis.opendocument.graphics
				application/vnd.oasis.opendocument.presentation
				application/vnd.oasis.opendocument.spreadsheet
				application/vnd.oasis.opendocument.text
				Rich Text Format (RTF)
[org.apache.jackrabbit.extractor.RTFTextExtractor]
				application/rtf
				HyperText Markup Language (HTML)
[org.apache.jackrabbit.extractor.HTMLTextExtractor]
				text/html
				Extensible Markup Language (XML)
[org.apache.jackrabbit.extractor.XMLTextExtractor]
				text/xml
			-->
			
			

			

			
			
			
			
			

		</SearchIndex>

	</Workspace>

	<!--
		Search index for content that is shared repository wide
		(/jcr:system tree, contains mainly versions)
	-->
	<SearchIndex
		class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
		
	</SearchIndex>

	<Versioning rootPath="d:/opt/bicdocument/Lufthansa-Cargo/versions">
		<FileSystem
			class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
			
		</FileSystem>
		<PersistenceManager
		
class="org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenceManager">
			
			
			
			
		</PersistenceManager>
	</Versioning>

</Repository>

---------

Any ideas?

Thanks for all the help.

Peter

-- 
View this message in context: http://www.nabble.com/Can%27t-get-CustomNode-with-XPATH-tp15518800p15518800.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message