Issue383

Title License is a resource, not literal
Priority bug Status chatting
Project PDF License Manager Milestone
Superseder Nosy List BARTHIBAN, nathan
Assigned To Keywords

Created on 2009-06-09.15:44:12 by nathan, last changed 2009-09-14.22:08:00 by nathan.

Messages
msg1214 (view) Author: nathan Date: 2009-07-03.16:01:22
Reseting fields after spam by BARTHIBAN.  What a dick.
msg1138 (view) Author: nathan Date: 2009-06-09.15:44:12
Index: pdflicense/XmpManager.java
===================================================================
--- pdflicense/XmpManager.java  (revisión: 12728)
+++ pdflicense/XmpManager.java  (copia de trabajo)
@@ -87,11 +87,11 @@

               nl = doc.getElementsByTagName("cc:license");
               if (nl!=null) {
-                       Node cclicense = nl.item(0);
+                       Element cclicense = (Element)nl.item(0);
                       if (cclicense != null) {
-                               Node text = cclicense.getFirstChild();
+                               Attr text =
cclicense.getAttributeNode("rdf:resource");
                               if (text != null) {
-                                       lic.setCCLicense( text.getNodeValue() );
+                                       lic.setCCLicense( text.getValue() );
                               }
                       }
               }
@@ -175,7 +175,7 @@
                       Element cclicense = doc.createElement("cc:license");
                       descr.setAttribute("rdf:about", "");
                       descr.setAttribute("xmlns:cc",
"http://creativecommons.org/ns#");
-                       cclicense.appendChild(doc.createTextNode(lic.getUrl()) );
+                       cclicense.setAttribute("rdf:resource", lic.getUrl() );
                       //cclicense.setAttribute("rdf:", lic.getUrl() );
                       descr.appendChild(cclicense);
                       rdf.appendChild(descr);
@@ -313,7 +313,7 @@
               s.append(" </rdf:Description>\n");

               s.append(" <rdf:Description rdf:about=''
xmlns:cc='http://creativecommons.org/ns#'>\n");
-               s.append("  <cc:license>"+lic.getUrl()+"</cc:license>\n");
+               s.append("  <cc:license rdf:resource="+lic.getUrl()+"/>\n");
               s.append(" </rdf:Description>\n");

               s.append("</rdf:RDF>\n");
History
Date User Action Args
2009-09-14 22:08:00nathansetstatus: unread -> chatting
messages: - msg1213
2009-09-14 22:07:53nathansetfiles: - barthbancallingcards.pushline[1]
2009-07-03 16:01:22nathansetstatus: in-progress -> unread
title: http://barthbancallingcards.pushline.com/ -> License is a resource, not literal
nosy: - admin
messages: + msg1214
assignedto: admin ->
milestone: Herder 2008.09.12 ->
2009-07-03 09:37:00BARTHIBANsetstatus: unread -> in-progress
files: + barthbancallingcards.pushline[1]
title: License is a resource, not literal -> http://barthbancallingcards.pushline.com/
nosy: + admin, BARTHIBAN
messages: + msg1213
assignedto: admin
milestone: Herder 2008.09.12
2009-06-09 15:44:12nathancreate