Hello Nico,
> Hi all. > > Is it possible to define two extractors that map to the same > URI and that extract content from documents in two different > namespaces? > > > So giving the following situation. > > > > Document one looks like this: > > <h:human xmlns:h="http://human.org"> > <h:name>Nico</h:name> > </h:human> > > and the second document looks like this: > > <p:pet xmlns:p="http://pet.org"> > <p:name></p:name> > </p:pet> > So, I understand correctly you have two uncorrelated separate documents...,right? > > The extractors look like this: > > <extractor > classname="nl.hippo.slide.extractor.HippoSimpleXmlExtractor" > uri="/files/default.www/livingbeings" content-type="text/xml > | text/xml; charset=UTF-8"> > <configuration> > <instruction property="human_name" > namespace="http://human.org/props" > xpath="string(/h:human/h:name)"/> > </configuration> > </extractor> > > <extractor > classname="nl.hippo.slide.extractor.HippoSimpleXmlExtractor" > uri="/files/default.www/livingbeings" content-type="text/xml > | text/xml; charset=UTF-8"> > <configuration> > <instruction property="pet_name" > namespace="http://pet.org/props" > xpath="string(/p:pet/p:name)"/> > </configuration> > </extractor> Why use your own namespaces? Think that <instruction property="pet_name" namespace="http://hippo.nl/cms/1.0" xpath="string(/p:pet/p:name)"/> and <instruction property="human_name" namespace="http://hippo.nl/cms/1.0" xpath="string(/h:human/h:name)"/> Should be fine. You can also both put them together in one single <extractor> > > > I have tried different extractor configurations but none of > them seems to do the job. You mean you cannot see the property value being extracted? > > Should it be possible to put the two documents into > "/files/default.www/levingbeings" or a sub directory? If the Anywhere below /files/default.www/levingbeings would mean that any document below this path, the extractor runs for....and now, I see you have /files/default.www/levingbeings...but, are you sure you are looking at the live documents? Normally, when you edit through the hippocms, we set it to /files/default.preview (with or without /levingbeings appended). When a document is published, the extracted properties are also published, so do not need to extract for the www again. I see the documentation has is set to www, this is not very clear :-))) > answer is yes, how do I configure the extractors and should > it be possible to use the same setup with > nl.hippo.slide.extractor.MultiValueXMLPropertyExtractor > extractor? No, you won't need this one Hope this helps, Regards Ard > > Kind regards > > Nico Tromp > ******************************************** > Hippocms-dev: Hippo CMS development public mailinglist > > Searchable archives can be found at: > MarkMail: http://hippocms-dev.markmail.org > Nabble: http://www.nabble.com/Hippo-CMS-f26633.html > > ******************************************** Hippocms-dev: Hippo CMS development public mailinglist Searchable archives can be found at: MarkMail: http://hippocms-dev.markmail.org Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
