You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by gb...@apache.org on 2012/12/16 11:22:36 UTC
svn commit: r1422500 -
/pdfbox/trunk/xmpbox/src/main/java/org/apache/padaf/xmpbox/xml/XmpSerializer.java
Author: gbailleul
Date: Sun Dec 16 10:22:35 2012
New Revision: 1422500
URL: http://svn.apache.org/viewvc?rev=1422500&view=rev
Log:
PDFBOX-1470: fix the 'about' attribute problem
Modified:
pdfbox/trunk/xmpbox/src/main/java/org/apache/padaf/xmpbox/xml/XmpSerializer.java
Modified: pdfbox/trunk/xmpbox/src/main/java/org/apache/padaf/xmpbox/xml/XmpSerializer.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/main/java/org/apache/padaf/xmpbox/xml/XmpSerializer.java?rev=1422500&r1=1422499&r2=1422500&view=diff
==============================================================================
--- pdfbox/trunk/xmpbox/src/main/java/org/apache/padaf/xmpbox/xml/XmpSerializer.java (original)
+++ pdfbox/trunk/xmpbox/src/main/java/org/apache/padaf/xmpbox/xml/XmpSerializer.java Sun Dec 16 10:22:35 2012
@@ -150,10 +150,10 @@ public class XmpSerializer {
private void fillElementWithAttributes (Element target, AbstractComplexProperty property ) {
List<Attribute> attributes = property.getAllAttributes();
for (Attribute attribute : attributes) {
- if (target.getNamespaceURI().equals(attribute.getNamespace())) {
- target.setAttribute(attribute.getName(), attribute.getValue());
- } else if (XmpConstants.RDF_NAMESPACE.equals(attribute.getNamespace())) {
+ if (XmpConstants.RDF_NAMESPACE.equals(attribute.getNamespace())) {
target.setAttribute(XmpConstants.DEFAULT_RDF_PREFIX+":"+attribute.getName(), attribute.getValue());
+ } else if (target.getNamespaceURI().equals(attribute.getNamespace())) {
+ target.setAttribute(attribute.getName(), attribute.getValue());
} else {
target.setAttribute(attribute.getName(), attribute.getValue());
}