Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Not able to get the 'dcterms:title' and 'oslc:serviceProvider' values from CCM catalog document using XPath expression

  Hello,

i am going through the OSLC Workshop projects, and trying to parse the CCM service provider catalog document using XPath. So i followed all the instructions there and tried to retrieve the title of the projects from catalog, using XPath expression as :

'/rdf:RDF/oslc:ServiceProviderCatalog/oslc:serviceProvider/oslc:ServiceProvider/dcterms:title'

and also set the namespaces as :
                XPath xpath2 = factory.newXPath();
xpath2.setNamespaceContext(
new NamespaceContextMap(new String[]
{ "oslc", "http://open-services.net/ns/core#",
"rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"dcterms","http://purl.org/dc/terms/",
}));

but i am not getting the titles here.


And also when i try the same by setting the XPath expression as : "//dcterms:title";
which is simplified expression, then it lists out all the project titles.

But overall i want to retrieve the title of project and its 'services.xml' document's URL, so i need to go from root of catalog, therefore i can not use the simplified XPath expression.

So my question is what is the correct expression to get the title and 'services.xml' document's URL using XPath?

0 votes


Be the first one to answer this question!

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 7,495

Question asked: Nov 17 '16, 7:50 a.m.

Question was seen: 1,313 times

Last updated: Nov 17 '16, 7:50 a.m.

Confirmation Cancel Confirm