summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5bb6744)
raw | patch | inline | side by side (parent: 5bb6744)
author | kidproto <kidproto@users.sourceforge.net> | |
Tue, 14 Aug 2007 07:22:11 +0000 (07:22 +0000) | ||
committer | kidproto <kidproto@users.sourceforge.net> | |
Tue, 14 Aug 2007 07:22:11 +0000 (07:22 +0000) |
src/dialogs/rdf.cpp | patch | blob | history | |
src/preferences-skeleton.h | patch | blob | history | |
src/xml/repr-util.cpp | patch | blob | history | |
src/xml/repr.h | patch | blob | history |
diff --git a/src/dialogs/rdf.cpp b/src/dialogs/rdf.cpp
index a145e08348448b913cafb80ac37801207a02b06e..cf3cd581f8d45ed6d90d0e3a59dd8cdb94c3f8b3 100644 (file)
--- a/src/dialogs/rdf.cpp
+++ b/src/dialogs/rdf.cpp
#include "xml/repr.h"
#include "rdf.h"
#include "sp-item-group.h"
+#include "prefs-utils.h"
/*
Example RDF XML from various places...
-<rdf:RDF xmlns="http://web.resource.org/cc/"
+<rdf:RDF xmlns="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Work rdf:about="">
</Work>
- <rdf:RDF xmlns="http://web.resource.org/cc/"
+ <rdf:RDF xmlns="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Work rdf:about="">
<dc:title>John Cliff</dc:title>
</Agent></dc:rights>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <license rdf:resource="http://web.resource.org/cc/PublicDomain" />
+ <license rdf:resource="http://creativecommons.org/ns#PublicDomain" />
</Work>
- <License rdf:about="http://web.resource.org/cc/PublicDomain">
- <permits rdf:resource="http://web.resource.org/cc/Reproduction" />
- <permits rdf:resource="http://web.resource.org/cc/Distribution" />
- <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ <License rdf:about="http://creativecommons.org/ns#PublicDomain">
+ <permits rdf:resource="http://creativecommons.org/ns#Reproduction" />
+ <permits rdf:resource="http://creativecommons.org/ns#Distribution" />
+ <permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</License>
</rdf:RDF>
};
struct rdf_double_t rdf_license_cc_a [] = {
- { "cc:permits", "http://web.resource.org/cc/Reproduction", },
- { "cc:permits", "http://web.resource.org/cc/Distribution", },
- { "cc:requires", "http://web.resource.org/cc/Notice", },
- { "cc:requires", "http://web.resource.org/cc/Attribution", },
- { "cc:permits", "http://web.resource.org/cc/DerivativeWorks", },
+ { "cc:permits", "http://creativecommons.org/ns#Reproduction", },
+ { "cc:permits", "http://creativecommons.org/ns#Distribution", },
+ { "cc:requires", "http://creativecommons.org/ns#Notice", },
+ { "cc:requires", "http://creativecommons.org/ns#Attribution", },
+ { "cc:permits", "http://creativecommons.org/ns#DerivativeWorks", },
{ NULL, NULL }
};
struct rdf_double_t rdf_license_cc_a_sa [] = {
- { "cc:permits", "http://web.resource.org/cc/Reproduction", },
- { "cc:permits", "http://web.resource.org/cc/Distribution", },
- { "cc:requires", "http://web.resource.org/cc/Notice", },
- { "cc:requires", "http://web.resource.org/cc/Attribution", },
- { "cc:permits", "http://web.resource.org/cc/DerivativeWorks", },
- { "cc:requires", "http://web.resource.org/cc/ShareAlike", },
+ { "cc:permits", "http://creativecommons.org/ns#Reproduction", },
+ { "cc:permits", "http://creativecommons.org/ns#Distribution", },
+ { "cc:requires", "http://creativecommons.org/ns#Notice", },
+ { "cc:requires", "http://creativecommons.org/ns#Attribution", },
+ { "cc:permits", "http://creativecommons.org/ns#DerivativeWorks", },
+ { "cc:requires", "http://creativecommons.org/ns#ShareAlike", },
{ NULL, NULL }
};
struct rdf_double_t rdf_license_cc_a_nd [] = {
- { "cc:permits", "http://web.resource.org/cc/Reproduction", },
- { "cc:permits", "http://web.resource.org/cc/Distribution", },
- { "cc:requires", "http://web.resource.org/cc/Notice", },
- { "cc:requires", "http://web.resource.org/cc/Attribution", },
+ { "cc:permits", "http://creativecommons.org/ns#Reproduction", },
+ { "cc:permits", "http://creativecommons.org/ns#Distribution", },
+ { "cc:requires", "http://creativecommons.org/ns#Notice", },
+ { "cc:requires", "http://creativecommons.org/ns#Attribution", },
{ NULL, NULL }
};
struct rdf_double_t rdf_license_cc_a_nc [] = {
- { "cc:permits", "http://web.resource.org/cc/Reproduction", },
- { "cc:permits", "http://web.resource.org/cc/Distribution", },
- { "cc:requires", "http://web.resource.org/cc/Notice", },
- { "cc:requires", "http://web.resource.org/cc/Attribution", },
- { "cc:prohibits", "http://web.resource.org/cc/CommercialUse", },
- { "cc:permits", "http://web.resource.org/cc/DerivativeWorks", },
+ { "cc:permits", "http://creativecommons.org/ns#Reproduction", },
+ { "cc:permits", "http://creativecommons.org/ns#Distribution", },
+ { "cc:requires", "http://creativecommons.org/ns#Notice", },
+ { "cc:requires", "http://creativecommons.org/ns#Attribution", },
+ { "cc:prohibits", "http://creativecommons.org/ns#CommercialUse", },
+ { "cc:permits", "http://creativecommons.org/ns#DerivativeWorks", },
{ NULL, NULL }
};
struct rdf_double_t rdf_license_cc_a_nc_sa [] = {
- { "cc:permits", "http://web.resource.org/cc/Reproduction", },
- { "cc:permits", "http://web.resource.org/cc/Distribution", },
- { "cc:requires", "http://web.resource.org/cc/Notice", },
- { "cc:requires", "http://web.resource.org/cc/Attribution", },
- { "cc:prohibits", "http://web.resource.org/cc/CommercialUse", },
- { "cc:permits", "http://web.resource.org/cc/DerivativeWorks", },
- { "cc:requires", "http://web.resource.org/cc/ShareAlike", },
+ { "cc:permits", "http://creativecommons.org/ns#Reproduction", },
+ { "cc:permits", "http://creativecommons.org/ns#Distribution", },
+ { "cc:requires", "http://creativecommons.org/ns#Notice", },
+ { "cc:requires", "http://creativecommons.org/ns#Attribution", },
+ { "cc:prohibits", "http://creativecommons.org/ns#CommercialUse", },
+ { "cc:permits", "http://creativecommons.org/ns#DerivativeWorks", },
+ { "cc:requires", "http://creativecommons.org/ns#ShareAlike", },
{ NULL, NULL }
};
struct rdf_double_t rdf_license_cc_a_nc_nd [] = {
- { "cc:permits", "http://web.resource.org/cc/Reproduction", },
- { "cc:permits", "http://web.resource.org/cc/Distribution", },
- { "cc:requires", "http://web.resource.org/cc/Notice", },
- { "cc:requires", "http://web.resource.org/cc/Attribution", },
- { "cc:prohibits", "http://web.resource.org/cc/CommercialUse", },
+ { "cc:permits", "http://creativecommons.org/ns#Reproduction", },
+ { "cc:permits", "http://creativecommons.org/ns#Distribution", },
+ { "cc:requires", "http://creativecommons.org/ns#Notice", },
+ { "cc:requires", "http://creativecommons.org/ns#Attribution", },
+ { "cc:prohibits", "http://creativecommons.org/ns#CommercialUse", },
{ NULL, NULL }
};
struct rdf_double_t rdf_license_pd [] = {
- { "cc:permits", "http://web.resource.org/cc/Reproduction", },
- { "cc:permits", "http://web.resource.org/cc/Distribution", },
- { "cc:permits", "http://web.resource.org/cc/DerivativeWorks", },
+ { "cc:permits", "http://creativecommons.org/ns#Reproduction", },
+ { "cc:permits", "http://creativecommons.org/ns#Distribution", },
+ { "cc:permits", "http://creativecommons.org/ns#DerivativeWorks", },
{ NULL, NULL }
};
struct rdf_double_t rdf_license_freeart [] = {
- { "cc:permits", "http://web.resource.org/cc/Reproduction", },
- { "cc:permits", "http://web.resource.org/cc/Distribution", },
- { "cc:permits", "http://web.resource.org/cc/DerivativeWorks", },
- { "cc:requires", "http://web.resource.org/cc/ShareAlike", },
- { "cc:requires", "http://web.resource.org/cc/Notice", },
- { "cc:requires", "http://web.resource.org/cc/Attribution", },
+ { "cc:permits", "http://creativecommons.org/ns#Reproduction", },
+ { "cc:permits", "http://creativecommons.org/ns#Distribution", },
+ { "cc:permits", "http://creativecommons.org/ns#DerivativeWorks", },
+ { "cc:requires", "http://creativecommons.org/ns#ShareAlike", },
+ { "cc:requires", "http://creativecommons.org/ns#Notice", },
+ { "cc:requires", "http://creativecommons.org/ns#Attribution", },
{ NULL, NULL }
};
gchar *string=NULL;
gchar *rdf_head="\
-<rdf:RDF xmlns=\"http://web.resource.org/cc/\"\
+<rdf:RDF xmlns=\"http://creativecommons.org/ns#\"\
xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\
xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\
";
struct rdf_entity_default_t rdf_defaults[] = {
{ "format", "image/svg+xml", },
{ "type", "http://purl.org/dc/dcmitype/StillImage", },
+ { "title", "", },
+ { "date", "", },
+ { "creator", "", },
+ { "rights", "", },
+ { "publisher", "", },
+ { "identifier", "", },
+ { "source", "", },
+ { "relation", "", },
+ { "language", "", },
+ { "subject", "", },
+ { "coverage", "", },
+ { "description", "", },
+ { "contributor", "", },
+ { "license_uri", "", },
{ NULL, NULL, }
};
struct rdf_work_entity_t * entity = rdf_find_entity ( rdf_default->name );
g_assert ( entity != NULL );
+ //get default matedata defined by user preferences
+ const gchar * text = prefs_get_string_attribute ("options.defaultmetadata", rdf_default->name);
+
if ( rdf_get_work_entity ( doc, entity ) == NULL ) {
- rdf_set_work_entity ( doc, entity, rdf_default->text );
+ rdf_set_work_entity ( doc, entity, text ? text : rdf_default->text );
}
}
}
index 8a04640e1c9518a164a859e3ed18d7f57bbab1e6..d6fea990d81d3af23af10a6ed4fceb863b16c6da 100644 (file)
" <group id=\"transform\" stroke=\"1\" rectcorners=\"1\" pattern=\"1\" gradient=\"1\" />\n"
" <group id=\"kbselection\" inlayer=\"1\" onlyvisible=\"1\" onlysensitive=\"1\" />\n"
" <group id=\"selection\" layerdeselect=\"1\" />\n"
+" <group id=\"defaultmetadata\" title=\"\" date=\"\" format=\"\" type=\"\" creator=\"\" rights=\"\" publisher=\"\" identifier=\"\" source=\"\" relation=\"\" language=\"\" subject=\"\" coverage=\"\" description=\"\" contributor=\"\" license=\"0\" license_uri=\"\" inkscapedefaults=\"1\" />\n"
" <group id=\"createbitmap\"/>\n"
" <group id=\"compassangledisplay\" value=\"0\"/>\n"
" <group id=\"maskobject\" topmost=\"1\" remove=\"1\"/>\n"
diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp
index 42b957d438da11b857b5266032c5a9ee68d1b9bd..693558cf766ee07f19fcae63c89e5f5bd2f4cc5c 100644 (file)
--- a/src/xml/repr-util.cpp
+++ b/src/xml/repr-util.cpp
static void
sp_xml_ns_register_defaults()
{
- static SPXMLNs defaults[9];
+ static SPXMLNs defaults[10];
defaults[0].uri = g_quark_from_static_string(SP_SODIPODI_NS_URI);
defaults[0].prefix = g_quark_from_static_string("sodipodi");
defaults[8].uri = g_quark_from_static_string("http://inkscape.sourceforge.net/DTD/s odipodi-0.dtd");
defaults[8].prefix = g_quark_from_static_string("sodipodi");
- defaults[8].next = NULL;
+ defaults[8].next = &defaults[9];
+
+ // This namespace URI is being phased out by Creative Commons
+
+ defaults[9].uri = g_quark_from_static_string(SP_OLD_CC_NS_URI);
+ defaults[9].prefix = g_quark_from_static_string("cc");
+ defaults[9].next = NULL;
namespaces = &defaults[0];
}
diff --git a/src/xml/repr.h b/src/xml/repr.h
index 89221656a1bd14377a13ffe57ce8598a3e0905f7..23786d3b80076170dcd9a21da3be06ee6efc6eff 100644 (file)
--- a/src/xml/repr.h
+++ b/src/xml/repr.h
#define SP_XLINK_NS_URI "http://www.w3.org/1999/xlink"
#define SP_SVG_NS_URI "http://www.w3.org/2000/svg"
#define SP_RDF_NS_URI "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-#define SP_CC_NS_URI "http://web.resource.org/cc/"
+#define SP_CC_NS_URI "http://creativecommons.org/ns#"
+#define SP_OLD_CC_NS_URI "http://web.resource.org/cc/"
#define SP_DC_NS_URI "http://purl.org/dc/elements/1.1/"
/**