Found solution for invalid dbpedia urls as QNames in XML
authorTom De Nies <tom.denies@ugent.be>
Wed, 17 Apr 2013 17:10:09 +0200
changeset 6199 694d75273218
parent 6197 42077aef3c42
child 6200 16b2b878483c
Found solution for invalid dbpedia urls as QNames in XML
dictionary/Overview.html
dictionary/releases/NOTE-prov-dictionary-20130430/Overview.html
dictionary/releases/NOTE-prov-dictionary-20130430/example/example.xml
--- a/dictionary/Overview.html	Wed Apr 17 13:37:56 2013 +0200
+++ b/dictionary/Overview.html	Wed Apr 17 17:10:09 2013 +0200
@@ -3326,16 +3326,18 @@
 http://www.w3.org/TR/2013/NOTE-prov-xml-20130430/schema/prov.xsd "&gt;
   &lt;!-- All Player Entities --&gt;
   ... &lt;!-- See complete provenance file --&gt;
+  
   &lt;!-- 2011 Roster --&gt;
-  &lt;prov:dictionary prov:id="ex:2011_roster" /&gt;
+  &lt;prov:dictionary prov:id="ex:roster_2011" /&gt;
   &lt;prov:hadDictionaryMember&gt;
-  ... &lt;!-- See complete provenance file --&gt;
+    &lt;prov:dictionary prov:ref="ex:roster_2011"/&gt;
+    ... &lt;!-- See complete provenance file --&gt;
   &lt;/prov:hadDictionaryMember&gt;
   
   &lt;!-- 2011 Opening Day lineup --&gt;
-  &lt;prov:dictionary prov:id="ex:2011_opening_day_lineup" /&gt;
+  &lt;prov:dictionary prov:id="ex:opening_day_lineup_2011" /&gt;
   &lt;prov:hadDictionaryMember&gt;
-    &lt;prov:dictionary prov:ref="ex:2011_opening_day_lineup"/&gt;
+    &lt;prov:dictionary prov:ref="ex:opening_day_lineup_2011"/&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;CF&lt;/prov:key&gt;
       &lt;prov:entity prov:ref="dbpedia:Jacoby_Ellsbury"/&gt;
@@ -3379,10 +3381,10 @@
   &lt;/prov:hadDictionaryMember&gt;
   
   &lt;!-- 2011 roster without players that left the team after the 2011 season or changed uniform number --&gt;
-  &lt;prov:dictionary prov:id="ex:2011_roster_after_removals" /&gt;
+  &lt;prov:dictionary prov:id="ex:roster_2011_after_removals" /&gt;
   &lt;prov:derivedByRemovalFrom&gt;
-    &lt;prov:newDictionary prov:ref="ex:2011_roster_after_removals"/&gt;
-    &lt;prov:oldDictionary prov:ref="ex:2011_roster"/&gt;
+    &lt;prov:newDictionary prov:ref="ex:roster_2011_after_removals"/&gt;
+    &lt;prov:oldDictionary prov:ref="ex:roster_2011"/&gt;
     &lt;prov:key&gt;10&lt;/prov:key&gt;
     &lt;prov:key&gt;12&lt;/prov:key&gt;
     &lt;prov:key&gt;16&lt;/prov:key&gt;
@@ -3409,10 +3411,10 @@
   &lt;/prov:derivedByRemovalFrom&gt;
   
   &lt;!-- 2012 Roster --&gt;
-  &lt;prov:dictionary prov:id="ex:2012_roster" /&gt;
+  &lt;prov:dictionary prov:id="ex:roster_2012" /&gt;
   &lt;prov:derivedByInsertionFrom&gt;
-    &lt;prov:newDictionary prov:ref="ex:2012_roster"/&gt;
-    &lt;prov:oldDictionary prov:ref="ex:2011_roster_after_removals"/&gt;
+    &lt;prov:newDictionary prov:ref="ex:roster_2012"/&gt;
+    &lt;prov:oldDictionary prov:ref="ex:roster_2011_after_removals"/&gt;
     &lt;prov:keyEntityPair&gt; 
       &lt;prov:key&gt;10&lt;/prov:key&gt;
       &lt;prov:entity prov:ref="dbpedia:Kelly_Shoppach"/&gt;
@@ -3427,7 +3429,7 @@
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;22&lt;/prov:key&gt;
-      &lt;prov:entity prov:ref="http://dbpedia.org/resource/James_Loney_(baseball)"/&gt;
+      &lt;prov:entity xmlns:dbpedia="http://dbpedia.org/resource/James_Loney_(baseball)#" prov:ref="dbpedia:James_Loney_baseball"/&gt;
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;23&lt;/prov:key&gt;
@@ -3451,7 +3453,7 @@
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;35&lt;/prov:key&gt;
-      &lt;prov:entity prov:ref="http://dbpedia.org/resource/Aaron_Cook_(baseball)"/&gt;
+      &lt;prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Aaron_Cook_(baseball)#" prov:ref="dbpedia:Aaron_Cook_baseball"/&gt;
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;37&lt;/prov:key&gt;
@@ -3459,7 +3461,7 @@
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;40&lt;/prov:key&gt;
-      &lt;prov:entity prov:ref="http://dbpedia.org/resource/Andrew_Bailey_(baseball)"/&gt;
+      &lt;prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Andrew_Bailey_(baseball)#" prov:ref="dbpedia:Andrew_Bailey_baseball"/&gt;
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;44&lt;/prov:key&gt;
@@ -3491,11 +3493,11 @@
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;56&lt;/prov:key&gt;
-      &lt;prov:entity prov:ref="http://dbpedia.org/resource/Ivan_DeJesus,_Jr."/&gt;
+      &lt;prov:entity prov:ref="dbpedia:Ivan_DeJesus_Jr."/&gt;
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;58&lt;/prov:key&gt;
-      &lt;prov:entity prov:ref="http://dbpedia.org/resource/Jose_Iglesias_(baseball)"/&gt;
+      &lt;prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Jose_Iglesias_(baseball)#" prov:ref="dbpedia:Jose_Iglesias_baseball"/&gt;
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;59&lt;/prov:key&gt;
@@ -3536,10 +3538,10 @@
   &lt;/prov:derivedByInsertionFrom&gt;
   
   &lt;!-- 2012 Opening Day lineup (update of 2011 dictionary) --&gt;
-  &lt;prov:dictionary prov:id="ex:2012_roster" /&gt;
+  &lt;prov:dictionary prov:id="ex:opening_day_lineup_2012" /&gt;
   &lt;prov:derivedByInsertionFrom&gt;
-    &lt;prov:newDictionary prov:ref="ex:2012_opening_day_lineup"/&gt;
-    &lt;prov:oldDictionary prov:ref="ex:2011_opening_day_lineup"/&gt;
+    &lt;prov:newDictionary prov:ref="ex:opening_day_lineup_2012"/&gt;
+    &lt;prov:oldDictionary prov:ref="ex:opening_day_lineup_2011"/&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;RF&lt;/prov:key&gt;
       &lt;prov:entity prov:ref="dbpedia:Ryan_Sweeney"/&gt;
@@ -3555,6 +3557,14 @@
   &lt;/prov:derivedByInsertionFrom&gt;
 &lt;/prov:document&gt;
   </pre>
+  <div class="remark">
+    <p>Note that certain disambiguated dbpedia URIs contain parentheses, and thus cannot be turned into valid XML namespace-qualified names (<a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-QName">QName</a>). 
+    For URIs like these, we add a valid <a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a> (derived by removing the invalid characters) as a fragment, and split the URI after the # symbol. 
+    The first part of the URI is then used to override the <code>dbpedia:</code> prefix in the element that uses the URI as an identifier, and the valid <a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a> is used as the <a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-LocalPart">LocalPart</a> of the <a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-QName">QName</a>.</p>
+    <p>For example:<br/>
+    <code>&lt;prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Jose_Iglesias_(baseball)#" prov:ref="dbpedia:Jose_Iglesias_baseball"/&gt;</code></p>
+    <p>While it can be argued whether or not this practice is entirely desirable, it does follow the guidance given in the <a href="http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/#section-Serialising">RDF/XML Syntax Specification</a>.</p>
+  </div>
   </section>
   </section>
 </section>
--- a/dictionary/releases/NOTE-prov-dictionary-20130430/Overview.html	Wed Apr 17 13:37:56 2013 +0200
+++ b/dictionary/releases/NOTE-prov-dictionary-20130430/Overview.html	Wed Apr 17 17:10:09 2013 +0200
@@ -3405,7 +3405,8 @@
   <h4><span class="secno">A.2.3 </span>PROV-XML</h4>
   <p>The following is an excerpt of the complete provenance, not listing all the player entities to avoid overloading this document. The complete provenance is available for download as a <a href="example/example.xml">separate file</a>.</p>
   
-  <pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+   <pre>
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
 &lt;prov:document
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
@@ -3416,16 +3417,18 @@
 http://www.w3.org/TR/2013/NOTE-prov-xml-20130430/schema/prov.xsd "&gt;
   &lt;!-- All Player Entities --&gt;
   ... &lt;!-- See complete provenance file --&gt;
+  
   &lt;!-- 2011 Roster --&gt;
-  &lt;prov:dictionary prov:id="ex:2011_roster" /&gt;
+  &lt;prov:dictionary prov:id="ex:roster_2011" /&gt;
   &lt;prov:hadDictionaryMember&gt;
-  ... &lt;!-- See complete provenance file --&gt;
+    &lt;prov:dictionary prov:ref="ex:roster_2011"/&gt;
+    ... &lt;!-- See complete provenance file --&gt;
   &lt;/prov:hadDictionaryMember&gt;
   
   &lt;!-- 2011 Opening Day lineup --&gt;
-  &lt;prov:dictionary prov:id="ex:2011_opening_day_lineup" /&gt;
+  &lt;prov:dictionary prov:id="ex:opening_day_lineup_2011" /&gt;
   &lt;prov:hadDictionaryMember&gt;
-    &lt;prov:dictionary prov:ref="ex:2011_opening_day_lineup"/&gt;
+    &lt;prov:dictionary prov:ref="ex:opening_day_lineup_2011"/&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;CF&lt;/prov:key&gt;
       &lt;prov:entity prov:ref="dbpedia:Jacoby_Ellsbury"/&gt;
@@ -3469,10 +3472,10 @@
   &lt;/prov:hadDictionaryMember&gt;
   
   &lt;!-- 2011 roster without players that left the team after the 2011 season or changed uniform number --&gt;
-  &lt;prov:dictionary prov:id="ex:2011_roster_after_removals" /&gt;
+  &lt;prov:dictionary prov:id="ex:roster_2011_after_removals" /&gt;
   &lt;prov:derivedByRemovalFrom&gt;
-    &lt;prov:newDictionary prov:ref="ex:2011_roster_after_removals"/&gt;
-    &lt;prov:oldDictionary prov:ref="ex:2011_roster"/&gt;
+    &lt;prov:newDictionary prov:ref="ex:roster_2011_after_removals"/&gt;
+    &lt;prov:oldDictionary prov:ref="ex:roster_2011"/&gt;
     &lt;prov:key&gt;10&lt;/prov:key&gt;
     &lt;prov:key&gt;12&lt;/prov:key&gt;
     &lt;prov:key&gt;16&lt;/prov:key&gt;
@@ -3499,10 +3502,10 @@
   &lt;/prov:derivedByRemovalFrom&gt;
   
   &lt;!-- 2012 Roster --&gt;
-  &lt;prov:dictionary prov:id="ex:2012_roster" /&gt;
+  &lt;prov:dictionary prov:id="ex:roster_2012" /&gt;
   &lt;prov:derivedByInsertionFrom&gt;
-    &lt;prov:newDictionary prov:ref="ex:2012_roster"/&gt;
-    &lt;prov:oldDictionary prov:ref="ex:2011_roster_after_removals"/&gt;
+    &lt;prov:newDictionary prov:ref="ex:roster_2012"/&gt;
+    &lt;prov:oldDictionary prov:ref="ex:roster_2011_after_removals"/&gt;
     &lt;prov:keyEntityPair&gt; 
       &lt;prov:key&gt;10&lt;/prov:key&gt;
       &lt;prov:entity prov:ref="dbpedia:Kelly_Shoppach"/&gt;
@@ -3517,7 +3520,7 @@
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;22&lt;/prov:key&gt;
-      &lt;prov:entity prov:ref="http://dbpedia.org/resource/James_Loney_(baseball)"/&gt;
+      &lt;prov:entity xmlns:dbpedia="http://dbpedia.org/resource/James_Loney_(baseball)#" prov:ref="dbpedia:James_Loney_baseball"/&gt;
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;23&lt;/prov:key&gt;
@@ -3541,7 +3544,7 @@
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;35&lt;/prov:key&gt;
-      &lt;prov:entity prov:ref="http://dbpedia.org/resource/Aaron_Cook_(baseball)"/&gt;
+      &lt;prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Aaron_Cook_(baseball)#" prov:ref="dbpedia:Aaron_Cook_baseball"/&gt;
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;37&lt;/prov:key&gt;
@@ -3549,7 +3552,7 @@
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;40&lt;/prov:key&gt;
-      &lt;prov:entity prov:ref="http://dbpedia.org/resource/Andrew_Bailey_(baseball)"/&gt;
+      &lt;prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Andrew_Bailey_(baseball)#" prov:ref="dbpedia:Andrew_Bailey_baseball"/&gt;
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;44&lt;/prov:key&gt;
@@ -3581,11 +3584,11 @@
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;56&lt;/prov:key&gt;
-      &lt;prov:entity prov:ref="http://dbpedia.org/resource/Ivan_DeJesus,_Jr."/&gt;
+      &lt;prov:entity prov:ref="dbpedia:Ivan_DeJesus_Jr."/&gt;
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;58&lt;/prov:key&gt;
-      &lt;prov:entity prov:ref="http://dbpedia.org/resource/Jose_Iglesias_(baseball)"/&gt;
+      &lt;prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Jose_Iglesias_(baseball)#" prov:ref="dbpedia:Jose_Iglesias_baseball"/&gt;
     &lt;/prov:keyEntityPair&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;59&lt;/prov:key&gt;
@@ -3626,10 +3629,10 @@
   &lt;/prov:derivedByInsertionFrom&gt;
   
   &lt;!-- 2012 Opening Day lineup (update of 2011 dictionary) --&gt;
-  &lt;prov:dictionary prov:id="ex:2012_roster" /&gt;
+  &lt;prov:dictionary prov:id="ex:opening_day_lineup_2012" /&gt;
   &lt;prov:derivedByInsertionFrom&gt;
-    &lt;prov:newDictionary prov:ref="ex:2012_opening_day_lineup"/&gt;
-    &lt;prov:oldDictionary prov:ref="ex:2011_opening_day_lineup"/&gt;
+    &lt;prov:newDictionary prov:ref="ex:opening_day_lineup_2012"/&gt;
+    &lt;prov:oldDictionary prov:ref="ex:opening_day_lineup_2011"/&gt;
     &lt;prov:keyEntityPair&gt;
       &lt;prov:key&gt;RF&lt;/prov:key&gt;
       &lt;prov:entity prov:ref="dbpedia:Ryan_Sweeney"/&gt;
@@ -3645,6 +3648,14 @@
   &lt;/prov:derivedByInsertionFrom&gt;
 &lt;/prov:document&gt;
   </pre>
+  <div class="remark">
+    <p>Note that certain disambiguated dbpedia URIs contain parentheses, and thus cannot be turned into valid XML namespace-qualified names (<a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-QName">QName</a>). 
+    For URIs like these, we add a valid <a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a> (derived by removing the invalid characters) as a fragment, and split the URI after the # symbol. 
+    The first part of the URI is then used to override the <code>dbpedia:</code> prefix in the element that uses the URI as an identifier, and the valid <a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a> is used as the <a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-LocalPart">LocalPart</a> of the <a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-QName">QName</a>.</p>
+    <p>For example:<br/>
+    <code>&lt;prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Jose_Iglesias_(baseball)#" prov:ref="dbpedia:Jose_Iglesias_baseball"/&gt;</code></p>
+    <p>While it can be argued whether or not this practice is entirely desirable, it does follow the guidance given in the <a href="http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/#section-Serialising">RDF/XML Syntax Specification</a>.</p>
+  </div>
   </section>
   </section>
 </section>
--- a/dictionary/releases/NOTE-prov-dictionary-20130430/example/example.xml	Wed Apr 17 13:37:56 2013 +0200
+++ b/dictionary/releases/NOTE-prov-dictionary-20130430/example/example.xml	Wed Apr 17 17:10:09 2013 +0200
@@ -18,7 +18,7 @@
   <prov:entity prov:id="dbpedia:Conor_Jackson"/>
   <prov:entity prov:id="dbpedia:Hideki_Okajima"/>
   <prov:entity prov:id="dbpedia:John_Lackey"/>
-  <prov:entity prov:id="dbpedia:Randy_Williams_(baseball)"/>
+  <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Randy_Williams_(baseball)#" prov:id="dbpedia:Randy_Williams_baseball"/>
   <prov:entity prov:id="dbpedia:Drew_Sutton"/>
   <prov:entity prov:id="dbpedia:Tim_Wakefield"/>
   <prov:entity prov:id="dbpedia:Bobby_Jenks"/>
@@ -30,19 +30,19 @@
   <prov:entity prov:id="dbpedia:Tommy_Hottovy"/>
   <prov:entity prov:id="dbpedia:J._D._Drew"/>
   <prov:entity prov:id="dbpedia:Kyle_Weiland"/>
-  <prov:entity prov:id="dbpedia:Jose_Iglesias_(baseball)"/>
+  <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Jose_Iglesias_(baseball)#" prov:id="dbpedia:Jose_Iglesias_baseball"/>
   <prov:entity prov:id="dbpedia:Kelly_Shoppach"/>
   <prov:entity prov:id="dbpedia:Ryan_Sweeney"/>
   <prov:entity prov:id="dbpedia:Jason_Repko"/>
-  <prov:entity prov:id="dbpedia:James_Loney_(baseball)"/>
+  <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/James_Loney_(baseball)#" prov:id="dbpedia:James_Loney_baseball"/>
   <prov:entity prov:id="dbpedia:Brent_Lillibridge"/>
   <prov:entity prov:id="dbpedia:Danny_Valencia"/>
   <prov:entity prov:id="dbpedia:Marlon_Byrd"/>
   <prov:entity prov:id="dbpedia:Scott_Podsednik"/>
   <prov:entity prov:id="dbpedia:Craig_Breslow"/>
-  <prov:entity prov:id="dbpedia:Aaron_Cook_(baseball)"/>
+  <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Aaron_Cook_(baseball)#" prov:id="dbpedia:Aaron_Cook_baseball"/>
   <prov:entity prov:id="dbpedia:Mark_Melancon"/>
-  <prov:entity prov:id="dbpedia:Andrew_Bailey_(baseball)"/>
+  <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Andrew_Bailey_(baseball)#" prov:id="dbpedia:Andrew_Bailey_baseball"/>
   <prov:entity prov:id="dbpedia:Vicente_Padilla"/>
   <prov:entity prov:id="dbpedia:Justin_Germano"/>
   <prov:entity prov:id="dbpedia:Zach_Stewart"/>
@@ -50,7 +50,7 @@
   <prov:entity prov:id="dbpedia:Mauro_Gomez"/>
   <prov:entity prov:id="dbpedia:Chris_Carpenter"/>
   <prov:entity prov:id="dbpedia:Pedro_Beato"/>
-  <prov:entity prov:id="dbpedia:Ivan_DeJesus,_Jr."/>
+  <prov:entity prov:id="dbpedia:Ivan_DeJesus_Jr."/>
   <prov:entity prov:id="dbpedia:Clayton_Mortensen"/>
   <prov:entity prov:id="dbpedia:Guillermo_Quiroz"/>
   <prov:entity prov:id="dbpedia:Will_Middlebrooks"/>
@@ -69,7 +69,7 @@
   <prov:entity prov:id="dbpedia:Kevin_Youkilis"/>
   <prov:entity prov:id="dbpedia:Adrian_Gonzalez"/>
   <prov:entity prov:id="dbpedia:Mike_Aviles"/>
-  <prov:entity prov:id="dbpedia:Andrew_Miller_(baseball)"/>
+  <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Andrew_Miller_(baseball)#" prov:id="dbpedia:Andrew_Miller_baseball"/>
   <prov:entity prov:id="dbpedia:Jon_Lester"/>
   <prov:entity prov:id="dbpedia:Matt_Albers"/>
   <prov:entity prov:id="dbpedia:David_Ortiz"/>
@@ -77,20 +77,20 @@
   <prov:entity prov:id="dbpedia:Franklin_Morales"/>
   <prov:entity prov:id="dbpedia:Scott_Atchison"/>
   <prov:entity prov:id="dbpedia:Daniel_Bard"/>
-  <prov:entity prov:id="dbpedia:Rich_Hill_(pitcher)"/>
+  <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Rich_Hill_(baseball)#" prov:id="dbpedia:Rich_Hill_baseball"/>
   <prov:entity prov:id="dbpedia:Darnell_McDonald"/>
   <prov:entity prov:id="dbpedia:Ryan_Lavarnway"/>
   <prov:entity prov:id="dbpedia:Felix_Doubront"/>
-  <prov:entity prov:id="dbpedia:Lars_Anderson_(baseball)"/>
+  <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Lars_Anderson_(baseball)#" prov:id="dbpedia:Lars_Anderson_baseball"/>
   <prov:entity prov:id="dbpedia:Junichi_Tazawa"/>
-  <prov:entity prov:id="dbpedia:Michael_Bowden_(baseball)"/>
+  <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Michael_Bowden_(baseball)#" prov:id="dbpedia:Michael_Bowden_baseball"/>
   <prov:entity prov:id="dbpedia:Nate_Spears"/>
   <prov:entity prov:id="dbpedia:Alfredo_Aceves"/>
   
   <!-- 2011 Roster -->
-  <prov:dictionary prov:id="ex:2011_roster" />
+  <prov:dictionary prov:id="ex:roster_2011" />
   <prov:hadDictionaryMember>
-    <prov:dictionary prov:ref="ex:2011_roster"/>
+    <prov:dictionary prov:ref="ex:roster_2011"/>
     <prov:keyEntityPair>
       <prov:key>91</prov:key>
       <prov:entity prov:ref="dbpedia:Alfredo_Aceves"/>
@@ -117,7 +117,7 @@
     </prov:keyEntityPair>  
     <prov:keyEntityPair>
       <prov:key>64</prov:key>
-      <prov:entity prov:ref="dbpedia:Michael_Bowden_(baseball)"/>
+      <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Michael_Bowden_(baseball)#" prov:ref="dbpedia:Michael_Bowden_baseball"/>
     </prov:keyEntityPair>  
     <prov:keyEntityPair>
       <prov:key>11</prov:key>
@@ -129,7 +129,7 @@
     </prov:keyEntityPair>  
     <prov:keyEntityPair>
       <prov:key>53</prov:key>
-      <prov:entity prov:ref="dbpedia:Rich_Hill_(pitcher)"/>
+      <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Rich_Hill_(baseball)#" prov:ref="dbpedia:Rich_Hill_baseball"/>
     </prov:keyEntityPair>  
     <prov:keyEntityPair>
       <prov:key>68</prov:key>
@@ -153,7 +153,7 @@
     </prov:keyEntityPair>  
     <prov:keyEntityPair>
       <prov:key>30</prov:key>
-      <prov:entity prov:ref="dbpedia:Andrew_Miller_(baseball)"/>
+      <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Andrew_Miller_(baseball)#" prov:ref="dbpedia:Andrew_Miller_baseball"/>
     </prov:keyEntityPair>  
     <prov:keyEntityPair>
       <prov:key>56</prov:key>
@@ -193,7 +193,7 @@
     </prov:keyEntityPair>  
     <prov:keyEntityPair>
       <prov:key>43</prov:key>
-      <prov:entity prov:ref="dbpedia:Randy_Williams_(baseball)"/>
+      <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Randy_Williams_(baseball)#" prov:ref="dbpedia:Randy_Williams_baseball"/>
     </prov:keyEntityPair>  
     <prov:keyEntityPair>
       <prov:key>60</prov:key>
@@ -209,7 +209,7 @@
     </prov:keyEntityPair>  
     <prov:keyEntityPair>
       <prov:key>62</prov:key>
-      <prov:entity prov:ref="dbpedia:Lars_Anderson_(baseball)"/>
+      <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Lars_Anderson_(baseball)#" prov:ref="dbpedia:Lars_Anderson_baseball"/>
     </prov:keyEntityPair>  
     <prov:keyEntityPair>
       <prov:key>3</prov:key>
@@ -221,7 +221,7 @@
     </prov:keyEntityPair>  
     <prov:keyEntityPair>
       <prov:key>76</prov:key>
-      <prov:entity prov:ref="dbpedia:Jose_Iglesias_(baseball)"/>
+      <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Jose_Iglesias_(baseball)#" prov:ref="dbpedia:Jose_Iglesias_baseball"/>
     </prov:keyEntityPair>  
     <prov:keyEntityPair>
       <prov:key>12</prov:key>
@@ -290,9 +290,9 @@
   </prov:hadDictionaryMember>
   
   <!-- 2011 Opening Day lineup -->
-  <prov:dictionary prov:id="ex:2011_opening_day_lineup" />
+  <prov:dictionary prov:id="ex:opening_day_lineup_2011" />
   <prov:hadDictionaryMember>
-    <prov:dictionary prov:ref="ex:2011_opening_day_lineup"/>
+    <prov:dictionary prov:ref="ex:opening_day_lineup_2011"/>
     <prov:keyEntityPair>
       <prov:key>CF</prov:key>
       <prov:entity prov:ref="dbpedia:Jacoby_Ellsbury"/>
@@ -336,10 +336,10 @@
   </prov:hadDictionaryMember>
   
   <!-- 2011 roster without players that left the team after the 2011 season or changed uniform number -->
-  <prov:dictionary prov:id="ex:2011_roster_after_removals" />
+  <prov:dictionary prov:id="ex:roster_2011_after_removals" />
   <prov:derivedByRemovalFrom>
-    <prov:newDictionary prov:ref="ex:2011_roster_after_removals"/>
-    <prov:oldDictionary prov:ref="ex:2011_roster"/>
+    <prov:newDictionary prov:ref="ex:roster_2011_after_removals"/>
+    <prov:oldDictionary prov:ref="ex:roster_2011"/>
     <prov:key>10</prov:key>
     <prov:key>12</prov:key>
     <prov:key>16</prov:key>
@@ -366,10 +366,10 @@
   </prov:derivedByRemovalFrom>
   
   <!-- 2012 Roster -->
-  <prov:dictionary prov:id="ex:2012_roster" />
+  <prov:dictionary prov:id="ex:roster_2012" />
   <prov:derivedByInsertionFrom>
-    <prov:newDictionary prov:ref="ex:2012_roster"/>
-    <prov:oldDictionary prov:ref="ex:2011_roster_after_removals"/>
+    <prov:newDictionary prov:ref="ex:roster_2012"/>
+    <prov:oldDictionary prov:ref="ex:roster_2011_after_removals"/>
     <prov:keyEntityPair> 
       <prov:key>10</prov:key>
       <prov:entity prov:ref="dbpedia:Kelly_Shoppach"/>
@@ -384,7 +384,7 @@
     </prov:keyEntityPair>
     <prov:keyEntityPair>
       <prov:key>22</prov:key>
-      <prov:entity prov:ref="dbpedia:James_Loney_(baseball)"/>
+      <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/James_Loney_(baseball)#" prov:ref="dbpedia:James_Loney_baseball"/>
     </prov:keyEntityPair>
     <prov:keyEntityPair>
       <prov:key>23</prov:key>
@@ -408,7 +408,7 @@
     </prov:keyEntityPair>
     <prov:keyEntityPair>
       <prov:key>35</prov:key>
-      <prov:entity prov:ref="dbpedia:Aaron_Cook_(baseball)"/>
+      <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Aaron_Cook_(baseball)#" prov:ref="dbpedia:Aaron_Cook_baseball"/>
     </prov:keyEntityPair>
     <prov:keyEntityPair>
       <prov:key>37</prov:key>
@@ -416,7 +416,7 @@
     </prov:keyEntityPair>
     <prov:keyEntityPair>
       <prov:key>40</prov:key>
-      <prov:entity prov:ref="dbpedia:Andrew_Bailey_(baseball)"/>
+      <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Andrew_Bailey_(baseball)#" prov:ref="dbpedia:Andrew_Bailey_baseball"/>
     </prov:keyEntityPair>
     <prov:keyEntityPair>
       <prov:key>44</prov:key>
@@ -448,11 +448,11 @@
     </prov:keyEntityPair>
     <prov:keyEntityPair>
       <prov:key>56</prov:key>
-      <prov:entity prov:ref="dbpedia:Ivan_DeJesus,_Jr."/>
+      <prov:entity prov:ref="dbpedia:Ivan_DeJesus_Jr."/>
     </prov:keyEntityPair>
     <prov:keyEntityPair>
       <prov:key>58</prov:key>
-      <prov:entity prov:ref="dbpedia:Jose_Iglesias_(baseball)"/>
+      <prov:entity xmlns:dbpedia="http://dbpedia.org/resource/Jose_Iglesias_(baseball)#" prov:ref="dbpedia:Jose_Iglesias_baseball"/>
     </prov:keyEntityPair>
     <prov:keyEntityPair>
       <prov:key>59</prov:key>
@@ -493,10 +493,10 @@
   </prov:derivedByInsertionFrom>
   
   <!-- 2012 Opening Day lineup (update of 2011 dictionary) -->
-  <prov:dictionary prov:id="ex:2012_roster" />
+  <prov:dictionary prov:id="ex:opening_day_lineup_2012" />
   <prov:derivedByInsertionFrom>
-    <prov:newDictionary prov:ref="ex:2012_opening_day_lineup"/>
-    <prov:oldDictionary prov:ref="ex:2011_opening_day_lineup"/>
+    <prov:newDictionary prov:ref="ex:opening_day_lineup_2012"/>
+    <prov:oldDictionary prov:ref="ex:opening_day_lineup_2011"/>
     <prov:keyEntityPair>
       <prov:key>RF</prov:key>
       <prov:entity prov:ref="dbpedia:Ryan_Sweeney"/>