Hello Nico, Thx first of all for sharing your code. Could you also post me an example of the extractor using this?
Also, I see in the patch: String documentNamespace = document.getRootElement().getNamespaceURI(); This means that the target namespace must match the namespace of the root element, right? So, the root element namespace defines in this case whether a property will be set or won't be set. I am not sure whether this is a really common usecase. Are there many usecases for this behavior? Regards Ard > > Hi all, > > as part of the project I'm currently working on we needed to > be able to have a extractors that only act on documents > depending on the namespace of the document. (See a ealier > post > http://www.nabble.com/Setting-properties-per-document-namespac > e-td19380940.htmlor > http://www.nabble.com/Mixed-content-and-extractors-td19319614. > html). I finally made some changes to the Hippo extractors. > They are now able to take into account the namespace of the > document. If you specify a so called target namespace the > properties are only set if the document has the same > namespace. If you don't specify the target namespace the > properties are set on every document. The target namespace is > set as a attribute on the 'configuration' element within the > 'extractor' element. I think it should have been a attribute > of the 'extractor' element but that would mean a lot more > changes and I just wanted it to work. > > If you like the idea, please feel free to use the code. And > maybe the Hippo guys can aply them to there code so everybody > can benifit from it. > > Please see the attached diff files for the patches. > > > Have fun > > 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
