I'd say that's a limitation of your XML model.
dom4j and JDOM, I know, maintain namespace information on the Element itself. Either of them will produce the output you desire. Be careful not to confuse the namespace declaration in the text document with the namespace of the element. The decl is just syntax to help get elements constructed with the correct namespaces. Most (good) models will attach the namespace 'decoration' directly to each element, regardless of where the namespace was declared, because the namespace of an element is part of its data. How does your XML model typically work if you start rearranging the nodes, regardless of jaxen/xpath? Does the namespace follow the moved node? Or does your XML model map more closely to the textual representation and not maintain actual namespace information on each element? Anyhow, I don't think this is a Jaxen issue. It's more of a serialization or object-model issue. -bob On Tue, 30 Jul 2002, Patrick Andries wrote: > > ----- Original Message ----- > From: "bob mcwhirter" [EMAIL PROTECTED] > > > > > > I really don't understand the question. > > > > If your xpath selects a node that has a namespace, then you get that node, > > along with its namespace. > > Yes, this is true. Sorry for the confusion (I should have spoken of > namespace declarations, I suppose), let me try to explain. > > Let's say I have a document > <cxml:MeasureDoc xmlns:cxml="http://<domain>/schemas/CXML_V1.0" ..> > .... > <cxml:Section> > Content > </cxml:Section> > ... > </cxml:MeasureDoc> > > and I select all the sections, I will then obtain this : > > <cxml:Section> > Content > </cxml:Section> > > what I would like to be produced (at serializiation time) is this : > > <cxml:Section xmlns:cxml="http://<domain>/schemas/CXML_V1.0"> > Content > </cxml:Section> > > and so on for each name space used. This may be a bad idea. If not, I don't > see how my Apache serializer could come up with this kind of information. So > I thought, perhaps a bit naively, that the process stripping the namespace > declarations could regenerate them when the namespace was used. > > > Patrick Andries > > - o - o - o - o - o - o - o - o - o - o - o - > Tout Unicode en français > (texte complet du standard, annotation, noms officiels français des noms de > caractère) > http://hapax.iquebec.com > > > -- Bob McWhirter [EMAIL PROTECTED] The Werken Company http://werken.com/ ------------------------------------------------------- This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today! http://seeker.dice.com/seeker.epl?rel_code1 _______________________________________________ Jaxen-interest mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jaxen-interest