Le jeudi 24 septembre 2009 à 13:20 +0200, Carsten Senger a écrit : > Hi all, > > I'm working on an im-/export of translations so plone can be used as the > cms for www.gnome.org. > My current prototype exports the translatable content as html files and > works with xml2po's xhtml mode. > For the import I need to carry some more information inside the html files. > First I thought about encoding them into xhtml's id attribute, but using > custom attributes with a namespace is cleaner. > > So currently the exported markup looks like this: > > <?xml version="1.0" encoding="utf-8"?> > <html xmlns:translation="http://gnome.org/namespaces/wgotranslation" > xmlns="http://www.w3.org/1999/xhtml"> > <head /> > <body> > <div translation:handler="ATField" > translation:uid="66be431c98adabc42d86a09f52f94258" > translation:name="description"> > Translatable Text, maybe with xhtml markup > </div> > ... > > Creating the pot file and merging the messagestrings back works, but xml2po > strips the namespace prefix from the attribute: > > ?xml version="1.0" encoding="utf-8"?> > <html xmlns:translation="http://gnome.org/namespaces/wgotranslation" > xmlns="http://www.w3.org/1999/xhtml"> > <head/> > <body xml:lang="DE"> > <div handler="ATField" uid="66be431c98adabc42d86a09f52f94258" > name="description"> > .... > > While it's not essential for the import (there will be no conflict with > valid attributes for <div>) it would be nice if xml2po could preserve the > namespace prefix like it preserved the prefix definition. > I've looked at the xml parsing code of xml2po, but I've never worked with > libxml and have no clue how to fix it.
Please enter a bug with sample files in Bugzilla xml2po product. I'm currently in the process of partially rewriting xml handling in xml2po, so it might be a good time to add this sort of bug/requirement. Claude _______________________________________________ gnome-web-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnome-web-list
