Addendum for 2): the explicit namespace declaration for each implicit namespace must be declared on the root node.
I'll add it to the wiki so noone has to read the whole discussion again. > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Ard Schrijvers > Sent: woensdag 2 juli 2008 12:34 > To: Hippo CMS development public mailinglist > Subject: RE: [HippoCMS-dev] Extractors: namespace in xpath > > Exactly! > > > > > So if I understand [1] correctly I have two options: > > > > 1) keep the implicit namespace declaration and use > > node()[local-name()='name_of_the_element'] > > 2) add an explicit namespace declaration and use its prefix > (not some > > reference to its URI) in the extractor E.g. > > ns:title with ns declarated. as explicit namespace prefix in the > > document. > > > > [1] > > http://www.nabble.com/Namespaces-in-documents-with-extractor-t > > o13854562.html#a13854562 > > > > Jasha > > > > ________________________________ > > > > Van: [EMAIL PROTECTED] namens Ard Schrijvers > > Verzonden: di 1-7-2008 14:45 > > Aan: Hippo CMS development public mailinglist > > Onderwerp: RE: [HippoCMS-dev] Extractors: namespace in xpath > > > > > > > > > > You need to add an explicit namespace to the document. If > you search > > this list you'll find some previous discussions about it. > > > > -Ard > > > > > Hello, > > > > > > I've written a content import tool and need to extract > some of the > > > xpaths to properties. The whole document has an implicit > namespace > > > declaration. > > > Using an xpath as /meta/summary/title/text() doesn't seem > > to work with > > > the HippoSimpleXmlExtractor, probably because of the implicit > > > namespace. Using > > > /node()[local-name()='meta']/node()[local-name()='summary']/no > > > de()[local-name()='title']/text() works, but makes my xpath > > a bit less > > > readable. I'd rather use a namespace prefix in my xpath like > > > /ns:meta/ns:summary/ns:title/text(). Is that possible and > > if so, how? > > > > > > Thanks, > > > > > > Jasha > > > ******************************************** > > > Hippocms-dev: Hippo CMS development public mailinglist > > > > > > Searchable archives can be found at: > > > <a href=ttp://hippocms-dev.markmail.org/">MarkMail</a> and <a > > > href=ttp://www.nabble.com/Hippo-CMS-f26633.html">Nable</a>. > > > > > > > > ******************************************** > > Hippocms-dev: Hippo CMS development public mailinglist > > > > Searchable archives can be found at: > > <a href=ttp://hippocms-dev.markmail.org/">MarkMail</a> and <a > > href=ttp://www.nabble.com/Hippo-CMS-f26633.html">Nable</a>. > > > > > > > > > ******************************************** > Hippocms-dev: Hippo CMS development public mailinglist > > Searchable archives can be found at: > <a href=ttp://hippocms-dev.markmail.org/">MarkMail</a> and <a > href=ttp://www.nabble.com/Hippo-CMS-f26633.html">Nable</a>. > > ******************************************** Hippocms-dev: Hippo CMS development public mailinglist Searchable archives can be found at: <a href="http://hippocms-dev.markmail.org/">MarkMail</a> and <a href="http://www.nabble.com/Hippo-CMS-f26633.html">Nable</a>.
