Hi Lawrence, You' r right, it is formally correct and valid, the problem was that i use the resulting xml in later elaboration where i use xquery/xpath. Thanks to yor suggestion i solved using XmlOptions.setSaveImplicitNamespaces(); now it looks as i desire ;)
thanks again, have a nice day >Hi Enrico > >I don't think there's anything technically wrong with the output the way >you've put it below? Prefixes are not part of the infoset and hence are >not currently retained (you could easily have clashes where people have >used the same prefix in 2 different schemas to mean 2 different >namespaces). So I think it's just that you would prefer the second >format over the first? (If not then please write again saying what the >error is). > >If it is just a formatting problem then try using some of the XmlOptions >in the save() call. E.g. I think setSaveSuggestedPrefixes() and >setSaveAggresiveNamespaces() may help you. > >Cheers, > >Lawrence > > > >>-----Original Message----- >>From: Enrico Di Marco [mailto:[EMAIL PROTECTED] >>Sent: Thursday, September 29, 2005 3:42 AM >>To: [email protected] >>Subject: oai:dc >> >>Hi, >>I' m trying to parse and build instances from oai:dc namespaces >> >> >(schema > > >>attached), >>with scomp -out -dl metadata.jar oai_dc.xsd >>but when i save a new instance it output in a strange manner, am i >>doing something wrong? >> >>xml out: >><?xml version="1.0" encoding="UTF-8"?> >><oai:dc xmlns:oai="http://www.openarchives.org/OAI/2.0/oai_dc/"> >> <ns:contributor >>xmlns:ns="http://purl.org/dc/elements/1.1/">contrib</ns:contributor> >> <ns:identifier >>xmlns:ns="http://purl.org/dc/elements/1.1/">id</ns:identifier> >> <ns:coverage >>xmlns:ns="http://purl.org/dc/elements/1.1/">cover</ns:coverage> >> <ns:language >>xmlns:ns="http://purl.org/dc/elements/1.1/">lang</ns:language> >></oai:dc> >> >>i would expect: >> >><?xml version="1.0" encoding="UTF-8"?> >><oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" >> xmlns:dc="http://purl.org/dc/elements/1.1/"> >> <dc:contributor>contrib</dc:title> >> <dc:title xml:lang="fr">title</dc:title> >> ..... >></oai_dc:dc> >> >>does anybody have any suggestion how to arrive here? >> >>thanks in advance >> >>bye >> >> > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

