<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.creativecommons.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hdworak</id>
		<title>Creative Commons - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.creativecommons.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hdworak"/>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/wiki/Special:Contributions/Hdworak"/>
		<updated>2026-05-11T04:02:25Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Extend_Metadata&amp;diff=18462</id>
		<title>Extend Metadata</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Extend_Metadata&amp;diff=18462"/>
				<updated>2008-08-18T10:56:38Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: /* Conclusions */ Improved the accessibility of the code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer]]&lt;br /&gt;
[[Category:Technology]]&lt;br /&gt;
[[Category:metadata]]&lt;br /&gt;
[[Category:guide]]&lt;br /&gt;
&lt;br /&gt;
== Extending Creative Commons Metadata ==&lt;br /&gt;
&lt;br /&gt;
Familiar with RDF and want to know how this fits in with the larger picture?&lt;br /&gt;
&lt;br /&gt;
* View our [http://creativecommons/schema.rdf RDF schema] for information about [http://creativecommons.org/ns our model] in a machine-processable form.&lt;br /&gt;
* Read our report on how to use [[#Defining dc:rights|dc:rights]].&lt;br /&gt;
* Take a look at [[#Embedding RDF in HTML|our conclusions on using RDF in HTML]].&lt;br /&gt;
&lt;br /&gt;
If you've got comments or suggestions on any of this, don't hesitate to [[Contact|send us a note]].&lt;br /&gt;
&lt;br /&gt;
== Defining &amp;lt;code&amp;gt;dc:rights&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Use of the Dublin Core dc:rights element has long been fraught with confusion and misunderstanding. A study of its use in practice shows a variety of different purposes and formats with little commonality. For the Creative Commons metadata specification, we wanted to define a profile of the rights element that was more useful and structured.&lt;br /&gt;
&lt;br /&gt;
Most copyright statements consist of a statement of the date and copyright holder (i.e. &amp;quot;(C) 2002 Gnomovision Records. All rights reserved.&amp;quot;) and the actual text of the legal license. The date can be described using dc:date, the copyright holder using dc:rights and the license can be linked to with cc:license.&lt;br /&gt;
&lt;br /&gt;
We've decided to use dc:rights to hold a more structured description of the copyright holder. Here's an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;XML&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dc:rights&amp;gt;&lt;br /&gt;
  &amp;lt;Agent rdf:about=&amp;quot;http://me.yoyo.dyne.name/&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;dc:title&amp;gt;Yo-Yo Dyne&amp;lt;/dc:title&amp;gt;&lt;br /&gt;
    &amp;lt;dc:date&amp;gt;1001-10-01&amp;lt;/dc:date&amp;gt;&lt;br /&gt;
  &amp;lt;/Agent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/dc:rights&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see the copyright holder is a person with a URL, a name and a date (of birth).&lt;br /&gt;
&lt;br /&gt;
In this way we cover all the parts of the copyright notice in a way that RDF tools can deal with. As a full example, this plain text statement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(C) 2002 Gnomovision Records. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
This document has NO WARRANTY. You are permitted to &lt;br /&gt;
copy it, modify it, and place up to three (3) copies &lt;br /&gt;
of it on the White House lawn.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
becomes this chunk of RDF:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;XML&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;rdf:Description&amp;gt;&lt;br /&gt;
  &amp;lt;dc:date&amp;gt;2002&amp;lt;/dc:date&amp;gt;&lt;br /&gt;
  &amp;lt;cc:license rdf:resource=&amp;quot;http://flf.org/licenses/whiteHouseLawn&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;dc:rights&amp;gt;&amp;lt;Agent&amp;gt;&lt;br /&gt;
    &amp;lt;dc:title&amp;gt;Gnomovision Records&amp;lt;/dc:title&amp;gt;&lt;br /&gt;
  &amp;lt;/Agent&amp;gt;&amp;lt;/dc:rights&amp;gt;&lt;br /&gt;
&amp;lt;/rdf:Description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The actual text and description of the license (&amp;quot;...place up to three (3) copies...&amp;quot;) is not included in this RDF, but would presumably be available at the URL given for the license.&lt;br /&gt;
&lt;br /&gt;
== Embedding RDF in HTML ==&lt;br /&gt;
&lt;br /&gt;
There may be lots of RDF out there, but it's no good if no one can find it. Since almost everything on the Web is HTML, we need a good way to hook RDF into the HTML Web. Here are some ways to do so:&lt;br /&gt;
&lt;br /&gt;
=== LINKing to an external file ===&lt;br /&gt;
&lt;br /&gt;
RDF can be kept in a separate file (&amp;lt;code&amp;gt;filename.rdf&amp;lt;/code&amp;gt;) and linked to using &amp;lt;code&amp;gt;&amp;lt;link rel=&amp;quot;meta&amp;quot; type=&amp;quot;application/rdf+xml&amp;quot; ... /&amp;gt;&amp;lt;/code&amp;gt; or an equivalent a href tag.&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Doesn't break anything.&lt;br /&gt;
* '''Con:''' Requires users to make files. Not supported by all readers.&lt;br /&gt;
&lt;br /&gt;
=== LINKing to a data: URL ===&lt;br /&gt;
&lt;br /&gt;
A data: URL (see [http://www.ietf.org/rfc/rfc2397.txt RFC 2397]) encapsulates data into the URL itself. If used as the &amp;lt;code&amp;gt;href&amp;lt;/code&amp;gt; attribute of a &amp;lt;code&amp;gt;&amp;lt;link&amp;gt;&amp;lt;/code&amp;gt; element, it can include an RDF document verbatim.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;XML&amp;quot;&amp;gt;&amp;lt;link rel=&amp;quot;meta&amp;quot; type=&amp;quot;application/rdf+xml&amp;quot; href=&amp;quot;data:application/rdf+xml,%3Crdf%3ARDF%20xmlns%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2F%22%0D%0A%20%20%20%20xmlns%3Adc%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%22%0D%0A%20%20%20%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%3E%0D%0A%3CWork%20rdf%3Aabout%3D%22http%3A%2F%2Fexample.org%2Fgnomophone.mp3%22%3E%0D%0A%20%20%3Cdc%3Atitle%3ECompilers%20in%20the%20Key%20of%20C%3C%2Fdc%3Atitle%3E%0D%0A%20%20%3Cdc%3Adescription%3EA%20lovely%20classical%20work%20on%20compiling%20code.%3C%2Fdc%3Adescription%3E%0D%0A%20%20%3Cdc%3Acreator%3E%3CAgent%3E%0D%0A%20%20%20%20%3Cdc%3Atitle%3EYo-Yo%20Dyne%3C%2Fdc%3Atitle%3E%0D%0A%20%20%3C%2FAgent%3E%3C%2Fdc%3Acreator%3E%0D%0A%20%20%3Cdc%3Arights%3E%3CAgent%3E%0D%0A%20%20%20%20%3Cdc%3Atitle%3EGnomophone%3C%2Fdc%3Atitle%3E%0D%0A%20%20%3C%2FAgent%3E%3C%2Fdc%3Arights%3E%0D%0A%20%20%3Cdc%3Adate%3E1842%3C%2Fdc%3Adate%3E%0D%0A%20%20%3Cdc%3Aformat%3Eaudio%2Fmpeg%3C%2Fdc%3Aformat%3E%0D%0A%20%20%3Cdc%3Atype%20rdf%3Aresource%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Fdcmitype%2FSound%22%20%2F%3E%0D%0A%20%20%3Cdc%3Asource%20rdf%3Aresource%3D%22http%3A%2F%2Fexample.net%2Fgnomovision.mov%22%20%2F%3E%0D%0A%20%20%3Clicense%20rdf%3Aresource%3D%22http%3A%2F%2Fcreativecommons.org%2Flicenses%2Fby-nc-nd%2F2.0%2F%22%20%2F%3E%0D%0A%20%20%3Clicense%20rdf%3Aresource%3D%22http%3A%2F%2Fwww.eff.org%2FIP%2FOpen_licenses%2Feff_oal.html%22%20%2F%3E%0D%0A%0D%0A%3C%2FWork%3E%0D%0A%0D%0A%3CLicense%20rdf%3Aabout%3D%22http%3A%2F%2Fcreativecommons.org%2Flicenses%2Fby-nc-nd%2F2.0%2F%22%3E%0D%0A%20%20%3Cpermits%20rdf%3Aresource%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2FReproduction%22%20%2F%3E%0D%0A%20%20%3Cpermits%20rdf%3Aresource%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2FDistribution%22%20%2F%3E%0D%0A%20%20%3Crequires%20rdf%3Aresource%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2FNotice%22%20%2F%3E%0D%0A%20%20%3Crequires%20rdf%3Aresource%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2FAttribution%22%20%2F%3E%0D%0A%20%20%3Cprohibits%20rdf%3Aresource%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2FCommercialUse%22%20%2F%3E%0D%0A%0D%0A%3C%2FLicense%3E%0D%0A%3C%2Frdf%3ARDF%3E&amp;quot; /&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' It includes the data in the HTML document; it doesn't break old browsers; it's standard-compliant; it uses the proper element (link) for associating metadata&lt;br /&gt;
* '''Con:''' It requires the RDF to be URL-encoded; it's hard to read; not all URL libraries can recognize or decode a data: URL; Creative Commons tools ([[MozCC]], [[CcLookup]], etc) don't support it, likely browsers don't/won't support it; not a preferred method.&lt;br /&gt;
&lt;br /&gt;
See also: [http://software.hixie.ch/utilities/cgi/data/data data: URI kitchen] (tool for making &amp;lt;code&amp;gt;data:&amp;lt;/code&amp;gt; URLs), [http://www.mozilla.org/quality/networking/docs/aboutdata.html about data: URLs] (from Mozilla)&lt;br /&gt;
&lt;br /&gt;
=== In the HEAD ===&lt;br /&gt;
&lt;br /&gt;
RDF can be included inline in the &amp;lt;code&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/code&amp;gt; tag of the document, along with the title and any &amp;lt;code&amp;gt;&amp;lt;link&amp;gt;&amp;lt;/code&amp;gt;s.&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Should be ignored by browsers.&lt;br /&gt;
* '''Con:''' Not all users may be able to insert content into the HEAD of their documents. Doesn't validate. Not a preferred method.&lt;br /&gt;
&lt;br /&gt;
=== In the BODY ===&lt;br /&gt;
&lt;br /&gt;
RDF can be included inline in the &amp;lt;code&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/code&amp;gt; of the document, like any other HTML.&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Super simple.&lt;br /&gt;
* '''Con:''' RDF needs to be formatted as attributes. May cause problems with some browsers. Doesn't validate.  Not a preferred method.&lt;br /&gt;
&lt;br /&gt;
=== In META ===&lt;br /&gt;
&lt;br /&gt;
A reference to the license a web page is offered under may be included in a &amp;lt;code&amp;gt;&amp;lt;meta&amp;gt;&amp;lt;/code&amp;gt; tag in the document's &amp;lt;code&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;XML&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta name=&amp;quot;DC.rights&amp;quot;&lt;br /&gt;
      scheme=&amp;quot;DCTERMS.URI&amp;quot;&lt;br /&gt;
      content=&amp;quot;http://creativecommons.org/licenses/by-sa/2.0/&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;meta name=&amp;quot;DC.rights&amp;quot;&lt;br /&gt;
      content=&amp;quot;(c) 2002 Gnomovision Records&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Won't break anything.&lt;br /&gt;
* '''Con:''' Not all users may be able to. '''Not RDF''' (included in this list due to obviousness). Limited to statements about the current page. Not a preferred method.&lt;br /&gt;
&lt;br /&gt;
Further reading: [http://dublincore.org/documents/dcq-html/ Expressing Dublin Core in HTML/XHTML meta and link elements]&lt;br /&gt;
&lt;br /&gt;
=== In a comment ===&lt;br /&gt;
&lt;br /&gt;
The RDF can be included in a &amp;lt;code&amp;gt;&amp;lt;!--comment--&amp;gt;&amp;lt;/code&amp;gt; in the document. The TrackBack system embeds its RDF in this way.&lt;br /&gt;
&lt;br /&gt;
Note that if a literal &amp;quot;--&amp;quot; is included in a comment, it must be encoded as &amp;quot;--&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Won't break anything. Super simple.&lt;br /&gt;
* '''Con:''' Not supported by all readers. Makes people queasy.&lt;br /&gt;
&lt;br /&gt;
=== Using element attributes ([[RDFa]]) ===&lt;br /&gt;
&lt;br /&gt;
[[RDFa]] allows RDF to be expressed using a small set of attributes.  The simple case of asserting a license only needs &amp;lt;code&amp;gt;rel=&amp;quot;license&amp;quot;&amp;lt;/code&amp;gt; added to the license link.  Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;XML&amp;quot;&amp;gt;&lt;br /&gt;
This work is licensed under the &amp;lt;a rel=&amp;quot;license&amp;quot;&lt;br /&gt;
    href=&amp;quot;http://creativecommons.org/licenses/by/2.0/&amp;quot;&amp;gt;Creative&lt;br /&gt;
    Commons Attribution License&amp;lt;/a&amp;gt;.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Super simple, extensible, [http://rdfa.info/wiki/How-to-validate validates].&lt;br /&gt;
* '''Con:''' Validation requires modifying the DOCTYPE which some users may be unable to do.&lt;br /&gt;
&lt;br /&gt;
See also: [[ccREL|Creative Commons Rights Expression Language]]&lt;br /&gt;
&lt;br /&gt;
=== Conclusions ===&lt;br /&gt;
&lt;br /&gt;
RDF readers should support all of these methods.&lt;br /&gt;
&lt;br /&gt;
We use and recommend [[RDFa]] since it's easy, straight forward, powerful and doesn't break existing web clients (browsers).  Our previous recommendation, including the RDF in an HTML comment, is no longer recommended.  For more information on our use of RDFa and metadata strategy generally, see information on the [[ccREL|CC Rights Expression Language]].&lt;br /&gt;
&lt;br /&gt;
For the RDFa equivalent of the RDF/XML embedded using the data: URI scheme above see below:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;XML&amp;quot;&amp;gt;&amp;lt;div xmlns:cc=&amp;quot;http://web.resource.org/cc/&amp;quot; xmlns:dc=&amp;quot;http://purl.org/dc/elements/1.1/&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div about=&amp;quot;http://example.org/gnomophone.mp3&amp;quot; typeof=&amp;quot;cc:Work&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;span property=&amp;quot;dc:title&amp;quot; content=&amp;quot;Compilers in the Key of C&amp;quot;&amp;gt;foo&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;span property=&amp;quot;dc:description&amp;quot; content=&amp;quot;A lovely classical work on compiling code.&amp;quot;&amp;gt;foo&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;span rel=&amp;quot;dc:creator&amp;quot;&amp;gt;&amp;lt;span typeof=&amp;quot;cc:Agent&amp;quot; property=&amp;quot;dc:title&amp;quot; content=&amp;quot;Yo-Yo Dyne&amp;quot;&amp;gt;foo&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;span rel=&amp;quot;dc:rights&amp;quot;&amp;gt;&amp;lt;span typeof=&amp;quot;cc:Agent&amp;quot; property=&amp;quot;dc:title&amp;quot; content=&amp;quot;Gnomophone&amp;quot;&amp;gt;foo&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;span property=&amp;quot;dc:date&amp;quot; content=&amp;quot;1842&amp;quot;&amp;gt;foo&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;span property=&amp;quot;dc:format&amp;quot; content=&amp;quot;audio/mpeg&amp;quot;&amp;gt;foo&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;dc:type&amp;quot; href=&amp;quot;http://purl.org/dc/dcmitype/Sound&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;,&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;dc:source&amp;quot; href=&amp;quot;http://example.net/gnomovision.mov&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;,&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;cc:license&amp;quot; href=&amp;quot;http://creativecommons.org/licenses/by-nc-nd/2.0/&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;,&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;cc:license&amp;quot; href=&amp;quot;http://artlibre.org/licence/lal/en/&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;,&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div about=&amp;quot;http://creativecommons.org/licenses/by-nc-nd/2.0/&amp;quot; typeof=&amp;quot;cc:License&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;cc:permits&amp;quot; href=&amp;quot;http://web.resource.org/cc/Reproduction&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;,&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;cc:permits&amp;quot; href=&amp;quot;http://web.resource.org/cc/Distribution&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;,&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;cc:requires&amp;quot; href=&amp;quot;http://web.resource.org/cc/Notice&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;,&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;cc:requires&amp;quot; href=&amp;quot;http://web.resource.org/cc/Attribution&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;,&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;cc:prohibits&amp;quot; href=&amp;quot;http://web.resource.org/cc/CommercialUse&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;,&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further reading: [http://esw.w3.org/topic/EmbeddingRDFinHTML Embedding RDF in HTML]&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008/PyDev_integration_with_the_Darklooks_theme&amp;diff=18404</id>
		<title>Rewrite Metadata Validator/SoC 2008/PyDev integration with the Darklooks theme</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008/PyDev_integration_with_the_Darklooks_theme&amp;diff=18404"/>
				<updated>2008-08-12T12:31:35Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If one uses Darklooks, a dark-coloured theme for [http://www.ubuntu.com/ Ubuntu], it might be desirable to make [http://pydev.sourceforge.net/ PyDev], a plug-in for [http://www.eclipse.org/ Eclipse SDK] to facilitate programming in [http://www.python.org/ Python], look similar. In order to do this, one has to save the public‑domain file listed below under the filename “dark.epf”, run Eclipse SDK with PyDev, and choose ''File'' » ''Import'' » ''General'' » ''Preferences'' (click “Next”), then select the file from the disk while preserving the option “Import all” enabled. After clicking “Finish”, Eclipse SDK should be restarted.&lt;br /&gt;
&amp;lt;pre&amp;gt;#Wed Aug 06 12:00:00 CEST 2008&lt;br /&gt;
/instance/org.python.pydev/STRING_COLOR=255,159,236&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.tag_bold=true&lt;br /&gt;
/instance/org.python.pydev/BACKQUOTES_COLOR=131,220,232&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.header_value=217,227,208&lt;br /&gt;
/instance/org.python.pydev/COMMENT_COLOR=186,233,147&lt;br /&gt;
/instance/org.python.pydev/CODE_COLOR=217,227,208&lt;br /&gt;
/instance/org.eclipse.core.resources/version=1&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.instr_bold=true&lt;br /&gt;
/instance/org.eclipse.ui/showIntro=false&lt;br /&gt;
/instance/org.python.pydev/NUMBER_COLOR=255,164,7&lt;br /&gt;
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.FindScope=122,73,95&lt;br /&gt;
/instance/org.eclipse.jdt.ui/org.eclipse.jface.textfont=1|DejaVu Sans Mono|10|0|GTK|1|;&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.tag=131,220,232&lt;br /&gt;
/instance/org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=true&lt;br /&gt;
/instance/org.eclipse.ui/ENABLE_ANIMATIONS=false&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.header_key=255,142,142&lt;br /&gt;
/instance/org.eclipse.ui.workbench/org.eclipse.ui.ide.systemDefault.org.eclipse.jface.textfont=1|DejaVu Sans Mono|10|0|GTK|1|;&lt;br /&gt;
/instance/org.python.pydev/CLASS_NAME_COLOR=246,152,42&lt;br /&gt;
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.SelectionBackground=58,73,76&lt;br /&gt;
/instance/org.eclipse.ui.editors/hyperlinkColor=173,173,255&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.xml_comment=186,233,147&lt;br /&gt;
/instance/org.eclipse.ui/CURRENT_THEME_ID=org.eclipse.ui.ide.systemDefault&lt;br /&gt;
/instance/org.python.pydev/KEYWORD_COLOR=131,220,232&lt;br /&gt;
/instance/org.python.pydev/SELF_COLOR=200,255,85&lt;br /&gt;
/instance/org.eclipse.ui.editors/lineNumberRuler=true&lt;br /&gt;
/instance/org.eclipse.ui.editors/lineNumberColor=255,255,255&lt;br /&gt;
/instance/org.python.pydev/FUNC_NAME_COLOR=246,236,42&lt;br /&gt;
/instance/org.python.pydev/EDITOR_MATCHING_BRACKETS_COLOR=207,0,0&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.header_assignment=217,227,208&lt;br /&gt;
/instance/org.eclipse.ui.editors/currentLineColor=70,70,70&lt;br /&gt;
/instance/org.eclipse.jdt.ui/fontPropagated=true&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.string=255,254,179&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.instr=131,220,232&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.default=217,227,208&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.header_attributes=131,220,232&amp;lt;/pre&amp;gt;&lt;br /&gt;
See also:&lt;br /&gt;
* [http://www.koders.com/noncode/fid8221DE2EE9B51242CB891283859739473FA9CD23.aspx An alternative dark theme for PyDev]&lt;br /&gt;
* [http://drnicwilliams.com/2006/08/08/textmate-theme-for-radrails/ TextMate theme for RadRails]&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008&amp;diff=18403</id>
		<title>Rewrite Metadata Validator/SoC 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008&amp;diff=18403"/>
				<updated>2008-08-12T07:28:10Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: PyDev integration with the Darklooks theme&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Challenge]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Project]]&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Creative Commons [http://code.google.com/soc/2008/cc/about.html participates] in [http://code.google.com/soc/2008/ Google Summer of Code™] and has accepted a proposal (see the [http://code.google.com/soc/2008/cc/appinfo.html?csaid=3C284456287C63B9 abstract]) of [http://hugo.dworak.info Hugo Dworak] based on its description of a task to [[Rewrite Metadata Validator|rewrite]] its now-defunct [http://validator.creativecommons.org metadata validator]. [http://creativecommons.org/about/people/#83 Asheesh Laroia] has been assigned as a mentor of the project. The work began on May 26th, 2008 as per the [http://code.google.com/soc/2008/faqs.html#0.1_timeline project timeline].&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
A licensor or a licensee wants to check whether a digitally embedded Creative Commons license associated with a file (a Web site in particular) is valid, does not use deprecated means to express it, and matches what the user has been expecting. Therefore, one opens the Web site and either pastes the source code as a direct input, uploads a file, or provides a link to retrieve it. The software displays the results of the analysis in a human-readable manner.&lt;br /&gt;
== Proposed timeline ==&lt;br /&gt;
*Week 1 — Preparing the SVN/Git or alike repository. Installing the required framework and libraries. Setting up temporary input (source code) and output (result) facilities. Testing the Python Web environment. &lt;br /&gt;
*Week 2 — Parsing cc-related RDFa information from well-formed XHTML files.&lt;br /&gt;
*Week 3 — Parsing cc-related RDF comments embedded in the XHTML code and those put directly in &amp;quot;head&amp;quot; and &amp;quot;body&amp;quot; elements.&lt;br /&gt;
*Week 4 — Parsing cc-related RDF files linked externally or embedded in the &amp;quot;link&amp;quot; element in the header section of the XHTML.&lt;br /&gt;
*Week 5 — Parsing cc-related dc-style XHTML-conforming information (embedded in &amp;quot;meta&amp;quot; elements or anchors).&lt;br /&gt;
*Week 6 — Ability to clean up the invalid XHTML code whenever possible.&lt;br /&gt;
*'''Midterm milestone''' — Developing a raw metadata validator capable of parsing Web sites and outputting valid cc-related information about them in a human-readable fashion.&lt;br /&gt;
*Week 7 — Parsing cc-related information contained within syndication feeds (RSS 1.0, RSS 2.0, Atom 1.0).&lt;br /&gt;
*Week 8 — Ability to submit an URI to the Web site to be parsed and upload a file using a form. Auto-detection of the MIME content type of such submissions based on HTTP headers and file extension. Ability for the user to override the automatic choice.&lt;br /&gt;
*Week 9 — Traversal of embedded objects and special links to obtain more information about licensing terms.&lt;br /&gt;
*Week 10 — Generating and storing statistics about the effects of validation such as: content type, errors, means of input, types of licences.&lt;br /&gt;
*Week 11 — Extensive testing and providing automatic test suites covering all of the aforementioned capabilities.&lt;br /&gt;
*Week 12 — Writing the documentation summarising the architecture. Making the application more user-friendly. Cloning the layout of the Creative Commons Web site.&lt;br /&gt;
*'''Final milestone''' — A full-fledged Web application capable of parsing licensing information from a variety of sources.&lt;br /&gt;
== Accessing the source code ==&lt;br /&gt;
The project has been split into two Git repositories called [http://code.creativecommons.org/viewgit?r=libvalidator.git libvalidator] and [http://code.creativecommons.org/viewgit?r=validator.git validator]. The first one is responsible for parsing the input with regard to licensing information. The latter is a Web application that is going to utilise the former to provide an interface for end users.&lt;br /&gt;
To browse the source code, one only needs to click on the two hyperlinks in the previous paragraph. To download the source code to a local machine, one needs to install Git first (which is available under the [http://packages.ubuntu.com/search?keywords=git-core git-core package] in [http://www.ubuntu.com/ Ubuntu]) and then issue the following commands in the console:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://code.creativecommons.org/libvalidator.git&lt;br /&gt;
git clone git://code.creativecommons.org/validator.git&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
== Related Web applications ==&lt;br /&gt;
* [http://validator.w3.org/ The W3C Markup Validation Service]&lt;br /&gt;
* [http://jigsaw.w3.org/css-validator/ The W3C CSS Validation Service]&lt;br /&gt;
* [http://www.w3.org/RDF/Validator/ The W3C RDF Validation Service]&lt;br /&gt;
* [http://www.w3.org/2007/08/pyRdfa/ RDFa Distiller]&lt;br /&gt;
* [http://hcs.science.uva.nl/projects/SWI-Prolog/packages/sgml/online.html Online SWI-Prolog RDF parser demo]&lt;br /&gt;
== Web framework and libraries ==&lt;br /&gt;
Once [http://www.python.org/ Python] becomes the programming language of the application, one has to decide about the software to be used in building a [http://en.wikipedia.org/wiki/Web_application Web application], so that not everything is written from scratch. First of all, the [http://en.wikipedia.org/wiki/Web_application_framework framework] which will handle the tasks that are typically found in Web applications such as the implementation of the [http://en.wikipedia.org/wiki/Model-view-controller MVC pattern], [http://en.wikipedia.org/wiki/Web_application_framework#URL_mapping URL mapping], and so on. There are several [http://wiki.python.org/moin/WebFrameworks Web application frameworks in Python], for instance [http://www.djangoproject.com/ Django] and [http://www.turbogears.org/ TurboGears]. As Creative Commons uses the BSD-like licensed [http://www.pylonshq.com/ Pylons], this is the preferred choice for the project. Pylons supports many [http://en.wikipedia.org/wiki/Web_template_system template systems], like [http://www.makotemplates.org/ Mako] and [http://jinja.pocoo.org/ Jinja], and it is our design choice to use the BSD-like licensed [http://genshi.edgewall.org/ Genshi] for this purpose.&lt;br /&gt;
&lt;br /&gt;
Other than the above, it comes to choosing Python packages to facilitate parsing and extracting information from the documents. To detect the character encoding of files provided by the users of the validator, the dual-licensed (cc-by and LGPL 3 or later) [http://cthedot.de/encutils/ encutils] might be used. It is powered by the [http://chardet.feedparser.org/ Universal Encoding Detector] (if present) and is designed to handle XML (including XHTML and RSS) and HTML. Next, one cannot expect that the users will provide only well-formed documents, therefore [http://utidylib.berlios.de/ µTidylib] (available under a MIT-style license) and the BSD-like licensed [http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup] may be used to clean up the ill-formed mark-up, so that it can still be parsed. Since Python packages based on tidy have poor Unicode support (as of July 2008), only the Beautiful Soup will be used to provide the fallback.&lt;br /&gt;
&lt;br /&gt;
Once the document is well-formed and decoded properly, one can proceed to extracting its embedded information relevant to the license terms. It can be represented in [[Extend Metadata|numerous different ways]]. For instance, RDF data can be provided inside comments or as elements inside head and body elements. Such data can also be encoded using a [http://en.wikipedia.org/wiki/Data:_URI_scheme data: URI scheme] or linked externally using the link element. To parse RDF data one can use the BSD-like licensed [http://rdflib.net/ RDFLib], the dual-licensed (W3C Software License and GNU GPL 2 or newer) [http://infomesh.net/2003/rdfparser/ rdfxml.py], and many others. To do the same with RDFa one can employ [http://rdfa.digitalbazaar.com/librdfa/ librdfa] (which has Python bindings and is licensed under GNU LGPL 2.1 or newer) or the MIT-style licensed [http://pypi.python.org/pypi/rdfadict rdfadict]. However, we have decided to take advantage of [http://www.w3.org/2007/08/pyRdfa/ pyRdfa] (available under the W3C Software License) as it supports not only RDFa, but also [http://dublincore.org/documents/dcq-html/ expressing Dublin Core in HTML/XHTML meta and link elements].&lt;br /&gt;
&lt;br /&gt;
We shall use [http://somethingaboutorange.com/mrl/projects/nose/ nose] for [http://en.wikipedia.org/wiki/Unit_testing unit testing] and both [http://peak.telecommunity.com/DevCenter/setuptools setuptools] and [http://pypi.python.org/pypi/zc.buildout zc.buildout] to handle dependencies and build Python packages. [http://git.or.cz/ Git] is the version control system of choice.&lt;br /&gt;
== Helper scripts ==&lt;br /&gt;
The following tools have been developed in order to facilitate the accomplishment of the goal, though they are not directly related to the project:&lt;br /&gt;
* [[Rewrite_Metadata_Validator/SoC_2008/Wine_Browsers_Setup|Wine browsers setup]] — a Bash script to install [http://www.apple.com/safari/ Safari] and [http://www.microsoft.com/windows/products/winfamily/ie/default.mspx Microsoft Internet Explorer] with the [http://www.microsoft.com/downloads/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;amp;displaylang=en Internet Explorer Developer Toolbar] under [http://www.winehq.org/ Wine],&lt;br /&gt;
* [[Rewrite_Metadata_Validator/SoC_2008/IRC_Scanner|IRC Scanner]] — a PHP 5 script that searches for the occurrences of a particular nickname in the logs of [[IRC|the Creative Commons' IRC channel]],&lt;br /&gt;
* [[Rewrite_Metadata_Validator/SoC_2008/PyDev_integration_with_the_Darklooks_theme|PyDev integration with the Darklooks theme]] — syntax highlighting on a dark background for [http://pydev.sourceforge.net/ PyDev].&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008/PyDev_integration_with_the_Darklooks_theme&amp;diff=18402</id>
		<title>Rewrite Metadata Validator/SoC 2008/PyDev integration with the Darklooks theme</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008/PyDev_integration_with_the_Darklooks_theme&amp;diff=18402"/>
				<updated>2008-08-12T07:24:03Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: Initial import&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If one uses Darklooks, a dark-coloured theme for [http://www.ubuntu.com/ Ubuntu], it might be desirable to make [http://pydev.sourceforge.net/ PyDev], a plug-in for [http://www.eclipse.org/ Eclipse SDK] to facilate programming in [http://www.python.org/ Python], look similar. In order to do this, one has to save the public‑domain file listed below under the filename “dark.epf”, run Eclipse SDK with PyDev, and choose ''File'' » ''Import'' » ''General'' » ''Preferences'' (click “Next”), then select the file from the disk while preserving the option “Import all” enabled. After clicking “Finish”, Eclipse SDK should be restarted.&lt;br /&gt;
&amp;lt;pre&amp;gt;#Wed Aug 06 12:00:00 CEST 2008&lt;br /&gt;
/instance/org.python.pydev/STRING_COLOR=255,159,236&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.tag_bold=true&lt;br /&gt;
/instance/org.python.pydev/BACKQUOTES_COLOR=131,220,232&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.header_value=217,227,208&lt;br /&gt;
/instance/org.python.pydev/COMMENT_COLOR=186,233,147&lt;br /&gt;
/instance/org.python.pydev/CODE_COLOR=217,227,208&lt;br /&gt;
/instance/org.eclipse.core.resources/version=1&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.instr_bold=true&lt;br /&gt;
/instance/org.eclipse.ui/showIntro=false&lt;br /&gt;
/instance/org.python.pydev/NUMBER_COLOR=255,164,7&lt;br /&gt;
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.FindScope=122,73,95&lt;br /&gt;
/instance/org.eclipse.jdt.ui/org.eclipse.jface.textfont=1|DejaVu Sans Mono|10|0|GTK|1|;&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.tag=131,220,232&lt;br /&gt;
/instance/org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=true&lt;br /&gt;
/instance/org.eclipse.ui/ENABLE_ANIMATIONS=false&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.header_key=255,142,142&lt;br /&gt;
/instance/org.eclipse.ui.workbench/org.eclipse.ui.ide.systemDefault.org.eclipse.jface.textfont=1|DejaVu Sans Mono|10|0|GTK|1|;&lt;br /&gt;
/instance/org.python.pydev/CLASS_NAME_COLOR=246,152,42&lt;br /&gt;
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.SelectionBackground=58,73,76&lt;br /&gt;
/instance/org.eclipse.ui.editors/hyperlinkColor=173,173,255&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.xml_comment=186,233,147&lt;br /&gt;
/instance/org.eclipse.ui/CURRENT_THEME_ID=org.eclipse.ui.ide.systemDefault&lt;br /&gt;
/instance/org.python.pydev/KEYWORD_COLOR=131,220,232&lt;br /&gt;
/instance/org.python.pydev/SELF_COLOR=200,255,85&lt;br /&gt;
/instance/org.eclipse.ui.editors/lineNumberRuler=true&lt;br /&gt;
/instance/org.eclipse.ui.editors/lineNumberColor=255,255,255&lt;br /&gt;
/instance/org.python.pydev/FUNC_NAME_COLOR=246,236,42&lt;br /&gt;
/instance/org.python.pydev/EDITOR_MATCHING_BRACKETS_COLOR=207,0,0&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.header_assignment=217,227,208&lt;br /&gt;
/instance/org.eclipse.ui.editors/currentLineColor=70,70,70&lt;br /&gt;
/instance/org.eclipse.jdt.ui/fontPropagated=true&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.string=255,254,179&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.instr=131,220,232&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.default=217,227,208&lt;br /&gt;
/instance/org.eclipse.pde.ui/editor.color.header_attributes=131,220,232&amp;lt;/pre&amp;gt;&lt;br /&gt;
See also:&lt;br /&gt;
* [http://www.koders.com/noncode/fid8221DE2EE9B51242CB891283859739473FA9CD23.aspx An alternative dark theme for PyDev]&lt;br /&gt;
* [http://drnicwilliams.com/2006/08/08/textmate-theme-for-radrails/ TextMate theme for RadRails]&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008&amp;diff=17866</id>
		<title>Rewrite Metadata Validator/SoC 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008&amp;diff=17866"/>
				<updated>2008-07-13T08:07:48Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: &amp;quot;Accessing the source code&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Challenge]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Project]]&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Creative Commons [http://code.google.com/soc/2008/cc/about.html participates] in [http://code.google.com/soc/2008/ Google Summer of Code™] and has accepted a proposal (see the [http://code.google.com/soc/2008/cc/appinfo.html?csaid=3C284456287C63B9 abstract]) of [http://hugo.dworak.info Hugo Dworak] based on its description of a task to [[Rewrite Metadata Validator|rewrite]] its now-defunct [http://validator.creativecommons.org metadata validator]. [http://creativecommons.org/about/people/#83 Asheesh Laroia] has been assigned as a mentor of the project. The work began on May 26th, 2008 as per the [http://code.google.com/soc/2008/faqs.html#0.1_timeline project timeline].&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
A licensor or a licensee wants to check whether a digitally embedded Creative Commons license associated with a file (a Web site in particular) is valid, does not use deprecated means to express it, and matches what the user has been expecting. Therefore, one opens the Web site and either pastes the source code as a direct input, uploads a file, or provides a link to retrieve it. The software displays the results of the analysis in a human-readable manner.&lt;br /&gt;
== Proposed timeline ==&lt;br /&gt;
*Week 1 — Preparing the SVN/Git or alike repository. Installing the required framework and libraries. Setting up temporary input (source code) and output (result) facilities. Testing the Python Web environment. &lt;br /&gt;
*Week 2 — Parsing cc-related RDFa information from well-formed XHTML files.&lt;br /&gt;
*Week 3 — Parsing cc-related RDF comments embedded in the XHTML code and those put directly in &amp;quot;head&amp;quot; and &amp;quot;body&amp;quot; elements.&lt;br /&gt;
*Week 4 — Parsing cc-related RDF files linked externally or embedded in the &amp;quot;link&amp;quot; element in the header section of the XHTML.&lt;br /&gt;
*Week 5 — Parsing cc-related dc-style XHTML-conforming information (embedded in &amp;quot;meta&amp;quot; elements or anchors).&lt;br /&gt;
*Week 6 — Ability to clean up the invalid XHTML code whenever possible.&lt;br /&gt;
*'''Midterm milestone''' — Developing a raw metadata validator capable of parsing Web sites and outputting valid cc-related information about them in a human-readable fashion.&lt;br /&gt;
*Week 7 — Parsing cc-related information contained within syndication feeds (RSS 1.0, RSS 2.0, Atom 1.0).&lt;br /&gt;
*Week 8 — Ability to submit an URI to the Web site to be parsed and upload a file using a form. Auto-detection of the MIME content type of such submissions based on HTTP headers and file extension. Ability for the user to override the automatic choice.&lt;br /&gt;
*Week 9 — Traversal of embedded objects and special links to obtain more information about licensing terms.&lt;br /&gt;
*Week 10 — Generating and storing statistics about the effects of validation such as: content type, errors, means of input, types of licences.&lt;br /&gt;
*Week 11 — Extensive testing and providing automatic test suites covering all of the aforementioned capabilities.&lt;br /&gt;
*Week 12 — Writing the documentation summarising the architecture. Making the application more user-friendly. Cloning the layout of the Creative Commons Web site.&lt;br /&gt;
*'''Final milestone''' — A full-fledged Web application capable of parsing licensing information from a variety of sources.&lt;br /&gt;
== Accessing the source code ==&lt;br /&gt;
The project has been split into two Git repositories called [http://code.creativecommons.org/viewgit?r=libvalidator.git libvalidator] and [http://code.creativecommons.org/viewgit?r=validator.git validator]. The first one is responsible for parsing the input with regard to licensing information. The latter is a Web application that is going to utilise the former to provide an interface for end users.&lt;br /&gt;
To browse the source code, one only needs to click on the two hyperlinks in the previous paragraph. To download the source code to a local machine, one needs to install Git first (which is available under the [http://packages.ubuntu.com/search?keywords=git-core git-core package] in [http://www.ubuntu.com/ Ubuntu]) and then issue the following commands in the console:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://code.creativecommons.org/libvalidator.git&lt;br /&gt;
git clone git://code.creativecommons.org/validator.git&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
== Related Web applications ==&lt;br /&gt;
* [http://validator.w3.org/ The W3C Markup Validation Service]&lt;br /&gt;
* [http://jigsaw.w3.org/css-validator/ The W3C CSS Validation Service]&lt;br /&gt;
* [http://www.w3.org/RDF/Validator/ The W3C RDF Validation Service]&lt;br /&gt;
* [http://www.w3.org/2007/08/pyRdfa/ RDFa Distiller]&lt;br /&gt;
* [http://hcs.science.uva.nl/projects/SWI-Prolog/packages/sgml/online.html Online SWI-Prolog RDF parser demo]&lt;br /&gt;
== Web framework and libraries ==&lt;br /&gt;
Once [http://www.python.org/ Python] becomes the programming language of the application, one has to decide about the software to be used in building a [http://en.wikipedia.org/wiki/Web_application Web application], so that not everything is written from scratch. First of all, the [http://en.wikipedia.org/wiki/Web_application_framework framework] which will handle the tasks that are typically found in Web applications such as the implementation of the [http://en.wikipedia.org/wiki/Model-view-controller MVC pattern], [http://en.wikipedia.org/wiki/Web_application_framework#URL_mapping URL mapping], and so on. There are several [http://wiki.python.org/moin/WebFrameworks Web application frameworks in Python], for instance [http://www.djangoproject.com/ Django] and [http://www.turbogears.org/ TurboGears]. As Creative Commons uses the BSD-like licensed [http://www.pylonshq.com/ Pylons], this is the preferred choice for the project. Pylons supports many [http://en.wikipedia.org/wiki/Web_template_system template systems], like [http://www.makotemplates.org/ Mako] and [http://jinja.pocoo.org/ Jinja], and it is our design choice to use the BSD-like licensed [http://genshi.edgewall.org/ Genshi] for this purpose.&lt;br /&gt;
&lt;br /&gt;
Other than the above, it comes to choosing Python packages to facilitate parsing and extracting information from the documents. To detect the character encoding of files provided by the users of the validator, the dual-licensed (cc-by and LGPL 3 or later) [http://cthedot.de/encutils/ encutils] might be used. It is powered by the [http://chardet.feedparser.org/ Universal Encoding Detector] (if present) and is designed to handle XML (including XHTML and RSS) and HTML. Next, one cannot expect that the users will provide only well-formed documents, therefore [http://utidylib.berlios.de/ µTidylib] (available under a MIT-style license) and the BSD-like licensed [http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup] may be used to clean up the ill-formed mark-up, so that it can still be parsed. Since Python packages based on tidy have poor Unicode support (as of July 2008), only the Beautiful Soup will be used to provide the fallback.&lt;br /&gt;
&lt;br /&gt;
Once the document is well-formed and decoded properly, one can proceed to extracting its embedded information relevant to the license terms. It can be represented in [[Extend Metadata|numerous different ways]]. For instance, RDF data can be provided inside comments or as elements inside head and body elements. Such data can also be encoded using a [http://en.wikipedia.org/wiki/Data:_URI_scheme data: URI scheme] or linked externally using the link element. To parse RDF data one can use the BSD-like licensed [http://rdflib.net/ RDFLib], the dual-licensed (W3C Software License and GNU GPL 2 or newer) [http://infomesh.net/2003/rdfparser/ rdfxml.py], and many others. To do the same with RDFa one can employ [http://rdfa.digitalbazaar.com/librdfa/ librdfa] (which has Python bindings and is licensed under GNU LGPL 2.1 or newer) or the MIT-style licensed [http://pypi.python.org/pypi/rdfadict rdfadict]. However, we have decided to take advantage of [http://www.w3.org/2007/08/pyRdfa/ pyRdfa] (available under the W3C Software License) as it supports not only RDFa, but also [http://dublincore.org/documents/dcq-html/ expressing Dublin Core in HTML/XHTML meta and link elements].&lt;br /&gt;
&lt;br /&gt;
We shall use [http://somethingaboutorange.com/mrl/projects/nose/ nose] for [http://en.wikipedia.org/wiki/Unit_testing unit testing] and both [http://peak.telecommunity.com/DevCenter/setuptools setuptools] and [http://pypi.python.org/pypi/zc.buildout zc.buildout] to handle dependencies and build Python packages. [http://git.or.cz/ Git] is the version control system of choice.&lt;br /&gt;
== Helper scripts ==&lt;br /&gt;
The following tools have been developed in order to facilitate the accomplishment of the goal, though they are not directly related to the project:&lt;br /&gt;
* [[Rewrite_Metadata_Validator/SoC_2008/Wine_Browsers_Setup|Wine browsers setup]] — a Bash script to install [http://www.apple.com/safari/ Safari] and [http://www.microsoft.com/windows/products/winfamily/ie/default.mspx Microsoft Internet Explorer] with the [http://www.microsoft.com/downloads/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;amp;displaylang=en Internet Explorer Developer Toolbar] under [http://www.winehq.org/ Wine],&lt;br /&gt;
* [[Rewrite_Metadata_Validator/SoC_2008/IRC_Scanner|IRC Scanner]] — a PHP 5 script that searches for the occurrences of a particular nickname in the logs of [[IRC|the Creative Commons' IRC channel]].&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008&amp;diff=17865</id>
		<title>Rewrite Metadata Validator/SoC 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008&amp;diff=17865"/>
				<updated>2008-07-13T07:50:57Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: The information on what was actually chosen&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Challenge]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Project]]&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Creative Commons [http://code.google.com/soc/2008/cc/about.html participates] in [http://code.google.com/soc/2008/ Google Summer of Code™] and has accepted a proposal (see the [http://code.google.com/soc/2008/cc/appinfo.html?csaid=3C284456287C63B9 abstract]) of [http://hugo.dworak.info Hugo Dworak] based on its description of a task to [[Rewrite Metadata Validator|rewrite]] its now-defunct [http://validator.creativecommons.org metadata validator]. [http://creativecommons.org/about/people/#83 Asheesh Laroia] has been assigned as a mentor of the project. The work began on May 26th, 2008 as per the [http://code.google.com/soc/2008/faqs.html#0.1_timeline project timeline].&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
A licensor or a licensee wants to check whether a digitally embedded Creative Commons license associated with a file (a Web site in particular) is valid, does not use deprecated means to express it, and matches what the user has been expecting. Therefore, one opens the Web site and either pastes the source code as a direct input, uploads a file, or provides a link to retrieve it. The software displays the results of the analysis in a human-readable manner.&lt;br /&gt;
== Proposed timeline ==&lt;br /&gt;
*Week 1 — Preparing the SVN/Git or alike repository. Installing the required framework and libraries. Setting up temporary input (source code) and output (result) facilities. Testing the Python Web environment. &lt;br /&gt;
*Week 2 — Parsing cc-related RDFa information from well-formed XHTML files.&lt;br /&gt;
*Week 3 — Parsing cc-related RDF comments embedded in the XHTML code and those put directly in &amp;quot;head&amp;quot; and &amp;quot;body&amp;quot; elements.&lt;br /&gt;
*Week 4 — Parsing cc-related RDF files linked externally or embedded in the &amp;quot;link&amp;quot; element in the header section of the XHTML.&lt;br /&gt;
*Week 5 — Parsing cc-related dc-style XHTML-conforming information (embedded in &amp;quot;meta&amp;quot; elements or anchors).&lt;br /&gt;
*Week 6 — Ability to clean up the invalid XHTML code whenever possible.&lt;br /&gt;
*'''Midterm milestone''' — Developing a raw metadata validator capable of parsing Web sites and outputting valid cc-related information about them in a human-readable fashion.&lt;br /&gt;
*Week 7 — Parsing cc-related information contained within syndication feeds (RSS 1.0, RSS 2.0, Atom 1.0).&lt;br /&gt;
*Week 8 — Ability to submit an URI to the Web site to be parsed and upload a file using a form. Auto-detection of the MIME content type of such submissions based on HTTP headers and file extension. Ability for the user to override the automatic choice.&lt;br /&gt;
*Week 9 — Traversal of embedded objects and special links to obtain more information about licensing terms.&lt;br /&gt;
*Week 10 — Generating and storing statistics about the effects of validation such as: content type, errors, means of input, types of licences.&lt;br /&gt;
*Week 11 — Extensive testing and providing automatic test suites covering all of the aforementioned capabilities.&lt;br /&gt;
*Week 12 — Writing the documentation summarising the architecture. Making the application more user-friendly. Cloning the layout of the Creative Commons Web site.&lt;br /&gt;
*'''Final milestone''' — A full-fledged Web application capable of parsing licensing information from a variety of sources.&lt;br /&gt;
== Related Web applications ==&lt;br /&gt;
* [http://validator.w3.org/ The W3C Markup Validation Service]&lt;br /&gt;
* [http://jigsaw.w3.org/css-validator/ The W3C CSS Validation Service]&lt;br /&gt;
* [http://www.w3.org/RDF/Validator/ The W3C RDF Validation Service]&lt;br /&gt;
* [http://www.w3.org/2007/08/pyRdfa/ RDFa Distiller]&lt;br /&gt;
* [http://hcs.science.uva.nl/projects/SWI-Prolog/packages/sgml/online.html Online SWI-Prolog RDF parser demo]&lt;br /&gt;
== Web framework and libraries ==&lt;br /&gt;
Once [http://www.python.org/ Python] becomes the programming language of the application, one has to decide about the software to be used in building a [http://en.wikipedia.org/wiki/Web_application Web application], so that not everything is written from scratch. First of all, the [http://en.wikipedia.org/wiki/Web_application_framework framework] which will handle the tasks that are typically found in Web applications such as the implementation of the [http://en.wikipedia.org/wiki/Model-view-controller MVC pattern], [http://en.wikipedia.org/wiki/Web_application_framework#URL_mapping URL mapping], and so on. There are several [http://wiki.python.org/moin/WebFrameworks Web application frameworks in Python], for instance [http://www.djangoproject.com/ Django] and [http://www.turbogears.org/ TurboGears]. As Creative Commons uses the BSD-like licensed [http://www.pylonshq.com/ Pylons], this is the preferred choice for the project. Pylons supports many [http://en.wikipedia.org/wiki/Web_template_system template systems], like [http://www.makotemplates.org/ Mako] and [http://jinja.pocoo.org/ Jinja], and it is our design choice to use the BSD-like licensed [http://genshi.edgewall.org/ Genshi] for this purpose.&lt;br /&gt;
&lt;br /&gt;
Other than the above, it comes to choosing Python packages to facilitate parsing and extracting information from the documents. To detect the character encoding of files provided by the users of the validator, the dual-licensed (cc-by and LGPL 3 or later) [http://cthedot.de/encutils/ encutils] shall be used. It is powered by the [http://chardet.feedparser.org/ Universal Encoding Detector] (if present) and is designed to handle XML (including XHTML and RSS) and HTML. Next, one cannot expect that the users will provide only well-formed documents, therefore [http://utidylib.berlios.de/ µTidylib] (available under a MIT-style license) and the BSD-like licensed [http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup] may be used to clean up the ill-formed mark-up, so that it can still be parsed. Since Python packages based on tidy have poor Unicode support (as of July 2008), only the Beautiful Soup will be used to provide the fallback.&lt;br /&gt;
&lt;br /&gt;
Once the document is well-formed and decoded properly, one can proceed to extracting its embedded information relevant to the license terms. It can be represented in [[Extend Metadata|numerous different ways]]. For instance, RDF data can be provided inside comments or as elements inside head and body elements. Such data can also be encoded using a [http://en.wikipedia.org/wiki/Data:_URI_scheme data: URI scheme] or linked externally using the link element. To parse RDF data one can use the BSD-like licensed [http://rdflib.net/ RDFLib], the dual-licensed (W3C Software License and GNU GPL 2 or newer) [http://infomesh.net/2003/rdfparser/ rdfxml.py], and many others. To do the same with RDFa one can employ [http://rdfa.digitalbazaar.com/librdfa/ librdfa] (which has Python bindings and is licensed under GNU LGPL 2.1 or newer) or the MIT-style licensed [http://pypi.python.org/pypi/rdfadict rdfadict]. However, we have decided to take advantage of [http://www.w3.org/2007/08/pyRdfa/ pyRdfa] (available under the W3C Software License) as it supports not only RDFa, but also [http://dublincore.org/documents/dcq-html/ expressing Dublin Core in HTML/XHTML meta and link elements].&lt;br /&gt;
&lt;br /&gt;
We shall use [http://somethingaboutorange.com/mrl/projects/nose/ nose] for [http://en.wikipedia.org/wiki/Unit_testing unit testing] and both [http://peak.telecommunity.com/DevCenter/setuptools setuptools] and [http://pypi.python.org/pypi/zc.buildout zc.buildout] to handle dependencies and build Python packages.&lt;br /&gt;
&lt;br /&gt;
== Helper scripts ==&lt;br /&gt;
The following tools have been developed in order to facilitate the accomplishment of the goal, though they are not directly related to the project:&lt;br /&gt;
* [[Rewrite_Metadata_Validator/SoC_2008/Wine_Browsers_Setup|Wine browsers setup]] — a Bash script to install [http://www.apple.com/safari/ Safari] and [http://www.microsoft.com/windows/products/winfamily/ie/default.mspx Microsoft Internet Explorer] with the [http://www.microsoft.com/downloads/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;amp;displaylang=en Internet Explorer Developer Toolbar] under [http://www.winehq.org/ Wine],&lt;br /&gt;
* [[Rewrite_Metadata_Validator/SoC_2008/IRC_Scanner|IRC Scanner]] — a PHP 5 script that searches for the occurrences of a particular nickname in the logs of [[IRC|the Creative Commons' IRC channel]].&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Extend_Metadata&amp;diff=17161</id>
		<title>Extend Metadata</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Extend_Metadata&amp;diff=17161"/>
				<updated>2008-06-28T19:41:19Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: An RDFa example (available under public domain)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer]]&lt;br /&gt;
[[Category:Technology]]&lt;br /&gt;
[[Category:metadata]]&lt;br /&gt;
[[Category:guide]]&lt;br /&gt;
&lt;br /&gt;
== Extending Creative Commons Metadata ==&lt;br /&gt;
&lt;br /&gt;
Familiar with RDF and want to know how this fits in with the larger picture?&lt;br /&gt;
&lt;br /&gt;
* View our [http://creativecommons/schema.rdf RDF schema] for information about [http://creativecommons.org/ns our model] in a machine-processable form.&lt;br /&gt;
* Read our report on how to use [[#Defining dc:rights|dc:rights]].&lt;br /&gt;
* Take a look at [[#Embedding RDF in HTML|our conclusions on using RDF in HTML]].&lt;br /&gt;
&lt;br /&gt;
If you've got comments or suggestions on any of this, don't hesitate to [[Contact|send us a note]].&lt;br /&gt;
&lt;br /&gt;
== Defining &amp;lt;code&amp;gt;dc:rights&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Use of the Dublin Core dc:rights element has long been fraught with confusion and misunderstanding. A study of its use in practice shows a variety of different purposes and formats with little commonality. For the Creative Commons metadata specification, we wanted to define a profile of the rights element that was more useful and structured.&lt;br /&gt;
&lt;br /&gt;
Most copyright statements consist of a statement of the date and copyright holder (i.e. &amp;quot;(C) 2002 Gnomovision Records. All rights reserved.&amp;quot;) and the actual text of the legal license. The date can be described using dc:date, the copyright holder using dc:rights and the license can be linked to with cc:license.&lt;br /&gt;
&lt;br /&gt;
We've decided to use dc:rights to hold a more structured description of the copyright holder. Here's an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;XML&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;dc:rights&amp;gt;&lt;br /&gt;
  &amp;lt;Agent rdf:about=&amp;quot;http://me.yoyo.dyne.name/&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;dc:title&amp;gt;Yo-Yo Dyne&amp;lt;/dc:title&amp;gt;&lt;br /&gt;
    &amp;lt;dc:date&amp;gt;1001-10-01&amp;lt;/dc:date&amp;gt;&lt;br /&gt;
  &amp;lt;/Agent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/dc:rights&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see the copyright holder is a person with a URL, a name and a date (of birth).&lt;br /&gt;
&lt;br /&gt;
In this way we cover all the parts of the copyright notice in a way that RDF tools can deal with. As a full example, this plain text statement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(C) 2002 Gnomovision Records. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
This document has NO WARRANTY. You are permitted to &lt;br /&gt;
copy it, modify it, and place up to three (3) copies &lt;br /&gt;
of it on the White House lawn.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
becomes this chunk of RDF:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;XML&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;rdf:Description&amp;gt;&lt;br /&gt;
  &amp;lt;dc:date&amp;gt;2002&amp;lt;/dc:date&amp;gt;&lt;br /&gt;
  &amp;lt;cc:license rdf:resource=&amp;quot;http://flf.org/licenses/whiteHouseLawn&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;dc:rights&amp;gt;&amp;lt;Agent&amp;gt;&lt;br /&gt;
    &amp;lt;dc:title&amp;gt;Gnomovision Records&amp;lt;/dc:title&amp;gt;&lt;br /&gt;
  &amp;lt;/Agent&amp;gt;&amp;lt;/dc:rights&amp;gt;&lt;br /&gt;
&amp;lt;/rdf:Description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The actual text and description of the license (&amp;quot;...place up to three (3) copies...&amp;quot;) is not included in this RDF, but would presumably be available at the URL given for the license.&lt;br /&gt;
&lt;br /&gt;
== Embedding RDF in HTML ==&lt;br /&gt;
&lt;br /&gt;
There may be lots of RDF out there, but it's no good if no one can find it. Since almost everything on the Web is HTML, we need a good way to hook RDF into the HTML Web. Here are some ways to do so:&lt;br /&gt;
&lt;br /&gt;
=== LINKing to an external file ===&lt;br /&gt;
&lt;br /&gt;
RDF can be kept in a separate file (&amp;lt;code&amp;gt;filename.rdf&amp;lt;/code&amp;gt;) and linked to using &amp;lt;code&amp;gt;&amp;lt;link rel=&amp;quot;meta&amp;quot; type=&amp;quot;application/rdf+xml&amp;quot; ... /&amp;gt;&amp;lt;/code&amp;gt; or an equivalent a href tag.&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Doesn't break anything.&lt;br /&gt;
* '''Con:''' Requires users to make files. Not supported by all readers.&lt;br /&gt;
&lt;br /&gt;
=== LINKing to a data: URL ===&lt;br /&gt;
&lt;br /&gt;
A data: URL (see [http://www.ietf.org/rfc/rfc2397.txt RFC 2397]) encapsulates data into the URL itself. If used as the &amp;lt;code&amp;gt;href&amp;lt;/code&amp;gt; attribute of a &amp;lt;code&amp;gt;&amp;lt;link&amp;gt;&amp;lt;/code&amp;gt; element, it can include an RDF document verbatim.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;XML&amp;quot;&amp;gt;&amp;lt;link rel=&amp;quot;meta&amp;quot; type=&amp;quot;application/rdf+xml&amp;quot; href=&amp;quot;data:application/rdf+xml,%3Crdf%3ARDF%20xmlns%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2F%22%0D%0A%20%20%20%20xmlns%3Adc%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%22%0D%0A%20%20%20%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%3E%0D%0A%3CWork%20rdf%3Aabout%3D%22http%3A%2F%2Fexample.org%2Fgnomophone.mp3%22%3E%0D%0A%20%20%3Cdc%3Atitle%3ECompilers%20in%20the%20Key%20of%20C%3C%2Fdc%3Atitle%3E%0D%0A%20%20%3Cdc%3Adescription%3EA%20lovely%20classical%20work%20on%20compiling%20code.%3C%2Fdc%3Adescription%3E%0D%0A%20%20%3Cdc%3Acreator%3E%3CAgent%3E%0D%0A%20%20%20%20%3Cdc%3Atitle%3EYo-Yo%20Dyne%3C%2Fdc%3Atitle%3E%0D%0A%20%20%3C%2FAgent%3E%3C%2Fdc%3Acreator%3E%0D%0A%20%20%3Cdc%3Arights%3E%3CAgent%3E%0D%0A%20%20%20%20%3Cdc%3Atitle%3EGnomophone%3C%2Fdc%3Atitle%3E%0D%0A%20%20%3C%2FAgent%3E%3C%2Fdc%3Arights%3E%0D%0A%20%20%3Cdc%3Adate%3E1842%3C%2Fdc%3Adate%3E%0D%0A%20%20%3Cdc%3Aformat%3Eaudio%2Fmpeg%3C%2Fdc%3Aformat%3E%0D%0A%20%20%3Cdc%3Atype%20rdf%3Aresource%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Fdcmitype%2FSound%22%20%2F%3E%0D%0A%20%20%3Cdc%3Asource%20rdf%3Aresource%3D%22http%3A%2F%2Fexample.net%2Fgnomovision.mov%22%20%2F%3E%0D%0A%20%20%3Clicense%20rdf%3Aresource%3D%22http%3A%2F%2Fcreativecommons.org%2Flicenses%2Fby-nc-nd%2F2.0%2F%22%20%2F%3E%0D%0A%20%20%3Clicense%20rdf%3Aresource%3D%22http%3A%2F%2Fwww.eff.org%2FIP%2FOpen_licenses%2Feff_oal.html%22%20%2F%3E%0D%0A%0D%0A%3C%2FWork%3E%0D%0A%0D%0A%3CLicense%20rdf%3Aabout%3D%22http%3A%2F%2Fcreativecommons.org%2Flicenses%2Fby-nc-nd%2F2.0%2F%22%3E%0D%0A%20%20%3Cpermits%20rdf%3Aresource%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2FReproduction%22%20%2F%3E%0D%0A%20%20%3Cpermits%20rdf%3Aresource%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2FDistribution%22%20%2F%3E%0D%0A%20%20%3Crequires%20rdf%3Aresource%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2FNotice%22%20%2F%3E%0D%0A%20%20%3Crequires%20rdf%3Aresource%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2FAttribution%22%20%2F%3E%0D%0A%20%20%3Cprohibits%20rdf%3Aresource%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2FCommercialUse%22%20%2F%3E%0D%0A%0D%0A%3C%2FLicense%3E%0D%0A%3C%2Frdf%3ARDF%3E&amp;quot; /&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' It includes the data in the HTML document; it doesn't break old browsers; it's standard-compliant; it uses the proper element (link) for associating metadata&lt;br /&gt;
* '''Con:''' It requires the RDF to be URL-encoded; it's hard to read; not all URL libraries can recognize or decode a data: URL; Creative Commons tools ([[MozCC]], [[CcLookup]], etc) don't support it, likely browsers don't/won't support it; not a preferred method.&lt;br /&gt;
&lt;br /&gt;
See also: [http://software.hixie.ch/utilities/cgi/data/data data: URI kitchen] (tool for making &amp;lt;code&amp;gt;data:&amp;lt;/code&amp;gt; URLs), [http://www.mozilla.org/quality/networking/docs/aboutdata.html about data: URLs] (from Mozilla)&lt;br /&gt;
&lt;br /&gt;
=== In the HEAD ===&lt;br /&gt;
&lt;br /&gt;
RDF can be included inline in the &amp;lt;code&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/code&amp;gt; tag of the document, along with the title and any &amp;lt;code&amp;gt;&amp;lt;link&amp;gt;&amp;lt;/code&amp;gt;s.&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Should be ignored by browsers.&lt;br /&gt;
* '''Con:''' Not all users may be able to insert content into the HEAD of their documents. Doesn't validate. Not a preferred method.&lt;br /&gt;
&lt;br /&gt;
=== In the BODY ===&lt;br /&gt;
&lt;br /&gt;
RDF can be included inline in the &amp;lt;code&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/code&amp;gt; of the document, like any other HTML.&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Super simple.&lt;br /&gt;
* '''Con:''' RDF needs to be formatted as attributes. May cause problems with some browsers. Doesn't validate.  Not a preferred method.&lt;br /&gt;
&lt;br /&gt;
=== In META ===&lt;br /&gt;
&lt;br /&gt;
A reference to the license a web page is offered under may be included in a &amp;lt;code&amp;gt;&amp;lt;meta&amp;gt;&amp;lt;/code&amp;gt; tag in the document's &amp;lt;code&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;XML&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta name=&amp;quot;DC.rights&amp;quot;&lt;br /&gt;
      scheme=&amp;quot;DCTERMS.URI&amp;quot;&lt;br /&gt;
      content=&amp;quot;http://creativecommons.org/licenses/by-sa/2.0/&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;meta name=&amp;quot;DC.rights&amp;quot;&lt;br /&gt;
      content=&amp;quot;(c) 2002 Gnomovision Records&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Won't break anything.&lt;br /&gt;
* '''Con:''' Not all users may be able to. '''Not RDF''' (included in this list due to obviousness). Limited to statements about the current page. Not a preferred method.&lt;br /&gt;
&lt;br /&gt;
Further reading: [http://dublincore.org/documents/dcq-html/ Expressing Dublin Core in HTML/XHTML meta and link elements]&lt;br /&gt;
&lt;br /&gt;
=== In a comment ===&lt;br /&gt;
&lt;br /&gt;
The RDF can be included in a &amp;lt;code&amp;gt;&amp;lt;!--comment--&amp;gt;&amp;lt;/code&amp;gt; in the document. The TrackBack system embeds its RDF in this way.&lt;br /&gt;
&lt;br /&gt;
Note that if a literal &amp;quot;--&amp;quot; is included in a comment, it must be encoded as &amp;quot;--&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Won't break anything. Super simple.&lt;br /&gt;
* '''Con:''' Not supported by all readers. Makes people queasy.&lt;br /&gt;
&lt;br /&gt;
=== Using element attributes ([[RDFa]]) ===&lt;br /&gt;
&lt;br /&gt;
[[RDFa]] allows RDF to be expressed using a small set of attributes.  The simple case of asserting a license only needs &amp;lt;code&amp;gt;rel=&amp;quot;license&amp;quot;&amp;lt;/code&amp;gt; added to the license link.  Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;XML&amp;quot;&amp;gt;&lt;br /&gt;
This work is licensed under the &amp;lt;a rel=&amp;quot;license&amp;quot;&lt;br /&gt;
    href=&amp;quot;http://creativecommons.org/licenses/by/2.0/&amp;quot;&amp;gt;Creative&lt;br /&gt;
    Commons Attribution License&amp;lt;/a&amp;gt;.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Super simple, extensible, [http://rdfa.info/wiki/How-to-validate validates].&lt;br /&gt;
* '''Con:''' Validation requires modifying the DOCTYPE which some users may be unable to do.&lt;br /&gt;
&lt;br /&gt;
See also: [[ccREL|Creative Commons Rights Expression Language]]&lt;br /&gt;
&lt;br /&gt;
=== Conclusions ===&lt;br /&gt;
&lt;br /&gt;
RDF readers should support all of these methods.&lt;br /&gt;
&lt;br /&gt;
We use and recommend [[RDFa]] since it's easy, straight forward, powerful and doesn't break existing web clients (browsers).  Our previous recommendation, including the RDF in an HTML comment, is no longer recommended.  For more information on our use of RDFa and metadata strategy generally, see information on the [[ccREL|CC Rights Expression Language]].&lt;br /&gt;
&lt;br /&gt;
For the RDFa equivalent of the RDF/XML embedded using the data: URI scheme above see below:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;XML&amp;quot;&amp;gt;&amp;lt;div xmlns:cc=&amp;quot;http://web.resource.org/cc/&amp;quot; xmlns:dc=&amp;quot;http://purl.org/dc/elements/1.1/&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div about=&amp;quot;http://example.org/gnomophone.mp3&amp;quot; typeof=&amp;quot;cc:Work&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;span property=&amp;quot;dc:title&amp;quot; content=&amp;quot;Compilers in the Key of C&amp;quot;&amp;gt;foo&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;span property=&amp;quot;dc:description&amp;quot; content=&amp;quot;A lovely classical work on compiling code.&amp;quot;&amp;gt;foo&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;span rel=&amp;quot;dc:creator&amp;quot;&amp;gt;&amp;lt;span typeof=&amp;quot;cc:Agent&amp;quot; property=&amp;quot;dc:title&amp;quot; content=&amp;quot;Yo-Yo Dyne&amp;quot;&amp;gt;foo&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;span rel=&amp;quot;dc:rights&amp;quot;&amp;gt;&amp;lt;span typeof=&amp;quot;cc:Agent&amp;quot; property=&amp;quot;dc:title&amp;quot; content=&amp;quot;Gnomophone&amp;quot;&amp;gt;foo&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;span property=&amp;quot;dc:date&amp;quot; content=&amp;quot;1842&amp;quot;&amp;gt;foo&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;span property=&amp;quot;dc:format&amp;quot; content=&amp;quot;audio/mpeg&amp;quot;&amp;gt;foo&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;dc:type&amp;quot; href=&amp;quot;http://purl.org/dc/dcmitype/Sound&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;dc:source&amp;quot; href=&amp;quot;http://example.net/gnomovision.mov&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;cc:license&amp;quot; href=&amp;quot;http://creativecommons.org/licenses/by-nc-nd/2.0/&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;cc:license&amp;quot; href=&amp;quot;http://artlibre.org/licence/lal/en/&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div about=&amp;quot;http://creativecommons.org/licenses/by-nc-nd/2.0/&amp;quot; typeof=&amp;quot;cc:License&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;cc:permits&amp;quot; href=&amp;quot;http://web.resource.org/cc/Reproduction&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;cc:permits&amp;quot; href=&amp;quot;http://web.resource.org/cc/Distribution&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;cc:requires&amp;quot; href=&amp;quot;http://web.resource.org/cc/Notice&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;cc:requires&amp;quot; href=&amp;quot;http://web.resource.org/cc/Attribution&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;&lt;br /&gt;
    &amp;lt;a rel=&amp;quot;cc:prohibits&amp;quot; href=&amp;quot;http://web.resource.org/cc/CommercialUse&amp;quot;&amp;gt;foo&amp;lt;/a&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Further reading: [http://esw.w3.org/topic/EmbeddingRDFinHTML Embedding RDF in HTML]&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008/Wine_Browsers_Setup&amp;diff=16748</id>
		<title>Rewrite Metadata Validator/SoC 2008/Wine Browsers Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008/Wine_Browsers_Setup&amp;diff=16748"/>
				<updated>2008-06-16T08:04:05Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: Syntax highlighting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If one wants to use two popular browsers (namely [http://www.apple.com/safari/ Safari] and [http://www.microsoft.com/windows/products/winfamily/ie/default.mspx Microsoft Internet Explorer] with the [http://www.microsoft.com/downloads/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;amp;displaylang=en Internet Explorer Developer Toolbar]) under [http://www.ubuntu.com/ Ubuntu] or [http://www.ubuntu.com/products/whatisubuntu/derivatives one of its flavours] to test the compatibility of his or her Web application, he or she must use [http://www.winehq.org/ Wine] for this purpose. It is important to note that in order to run Microsoft Internet Explorer under Ubuntu, one has to obtain a legal copy of [http://www.microsoft.com/windows/ Microsoft Windows]. One can also experience problems when installing Internet Explorer Developer Toolbar, because [http://www.tatanka.com.br/ies4linux/page/Main_Page IEs 4 Linux] installs Microsoft Internet Explorer 6 in such a fashion, that it runs under a simulated Microsoft Windows 98 environment, whereas the aforementioned toolbar requires Microsoft Windows 2000 or newer. If [http://www.wine-doors.org/ Wine-Doors] is used to accomplish this goal, it may suffer from [http://www.wine-doors.org/trac/ticket/723 a bug that has been closed just recently] (as of June 2008). The following public domain Bash script can be helpful to install both browsers:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;#!/bin/bash&lt;br /&gt;
sudo apt-get install sed wget gedit wine binfmt-support msttcorefonts&lt;br /&gt;
cd ~&lt;br /&gt;
if [ ! -f ies4linux-latest.tar.gz ]&lt;br /&gt;
then&lt;br /&gt;
wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz&lt;br /&gt;
fi&lt;br /&gt;
if [ ! -f IEDevToolBarSetup.msi ]&lt;br /&gt;
then&lt;br /&gt;
wget http://download.microsoft.com/download/f/3/c/f3c93e70-ccdc-46c9-bbd4-70d94bdd0cc9/IEDevToolBarSetup.msi&lt;br /&gt;
fi&lt;br /&gt;
if [ ! -f SafariSetup.exe ]&lt;br /&gt;
then&lt;br /&gt;
wget http://appldnld.apple.com.edgesuite.net/content.info.apple.com/Safari3/061-4602.20080416.t5rGb/SafariSetup.exe&lt;br /&gt;
fi&lt;br /&gt;
if [ ! -f winetricks ]&lt;br /&gt;
then&lt;br /&gt;
wget http://www.kegel.com/wine/winetricks&lt;br /&gt;
fi&lt;br /&gt;
chmod u+x winetricks&lt;br /&gt;
cat &amp;gt; theme.reg &amp;lt;&amp;lt;'EOF'&lt;br /&gt;
Windows Registry Editor Version 5.00&lt;br /&gt;
&lt;br /&gt;
[HKEY_CURRENT_USER\Control Panel\Colors]&lt;br /&gt;
&amp;quot;ActiveBorder&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;ActiveTitle&amp;quot;=&amp;quot;10 36 106&amp;quot;&lt;br /&gt;
&amp;quot;AppWorkSpace&amp;quot;=&amp;quot;128 128 128&amp;quot;&lt;br /&gt;
&amp;quot;Background&amp;quot;=&amp;quot;58 110 165&amp;quot;&lt;br /&gt;
&amp;quot;ButtonAlternateFace&amp;quot;=&amp;quot;181 181 181&amp;quot;&lt;br /&gt;
&amp;quot;ButtonDkShadow&amp;quot;=&amp;quot;64 64 64&amp;quot;&lt;br /&gt;
&amp;quot;ButtonFace&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;ButtonHilight&amp;quot;=&amp;quot;255 255 255&amp;quot;&lt;br /&gt;
&amp;quot;ButtonLight&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;ButtonShadow&amp;quot;=&amp;quot;128 128 128&amp;quot;&lt;br /&gt;
&amp;quot;ButtonText&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
&amp;quot;GradientActiveTitle&amp;quot;=&amp;quot;166 202 240&amp;quot;&lt;br /&gt;
&amp;quot;GradientInactiveTitle&amp;quot;=&amp;quot;192 192 192&amp;quot;&lt;br /&gt;
&amp;quot;GrayText&amp;quot;=&amp;quot;128 128 128&amp;quot;&lt;br /&gt;
&amp;quot;Hilight&amp;quot;=&amp;quot;10 36 106&amp;quot;&lt;br /&gt;
&amp;quot;HilightText&amp;quot;=&amp;quot;255 255 255&amp;quot;&lt;br /&gt;
&amp;quot;HotTrackingColor&amp;quot;=&amp;quot;0 0 128&amp;quot;&lt;br /&gt;
&amp;quot;InactiveBorder&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;InactiveTitle&amp;quot;=&amp;quot;128 128 128&amp;quot;&lt;br /&gt;
&amp;quot;InactiveTitleText&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;InfoText&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
&amp;quot;InfoWindow&amp;quot;=&amp;quot;255 255 225&amp;quot;&lt;br /&gt;
&amp;quot;Menu&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;MenuBar&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;MenuHilight&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
&amp;quot;MenuText&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
&amp;quot;Scrollbar&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;TitleText&amp;quot;=&amp;quot;255 255 255&amp;quot;&lt;br /&gt;
&amp;quot;Window&amp;quot;=&amp;quot;255 255 255&amp;quot;&lt;br /&gt;
&amp;quot;WindowFrame&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
&amp;quot;WindowText&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
EOF&lt;br /&gt;
mkdir ~/.browsers&lt;br /&gt;
WINEPREFIX=~/.browsers/safari wineprefixcreate&lt;br /&gt;
WINEPREFIX=~/.browsers/safari ./winetricks corefonts vcrun2005&lt;br /&gt;
WINEPREFIX=~/.browsers/safari wine SafariSetup.exe # uncheck additional commands&lt;br /&gt;
WINEPREFIX=~/.browsers/safari wineserver -k&lt;br /&gt;
WINEPREFIX=~/.browsers/safari regedit theme.reg&lt;br /&gt;
tar zxvf ies4linux-latest.tar.gz&lt;br /&gt;
cd ies4linux-*&lt;br /&gt;
./ies4linux --no-gui --locale PL --basedir ~/.browsers&lt;br /&gt;
cd ~&lt;br /&gt;
rm -f ~/.browsers/ie6/.firstrun&lt;br /&gt;
sed -i 's/DllOverrides/DllOverridez/g;s/win98/win2k/g' ~/.browsers/ie6/user.reg&lt;br /&gt;
WINEPREFIX=~/.browsers/ie6 msiexec /i IEDevToolBarSetup.msi&amp;lt;/source&amp;gt;&lt;br /&gt;
The following commands have to be executed afterwards:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sed -i 's/DllOverridez/DllOverrides/g;s/win2k/win98/g' ~/.browsers/ie6/user.reg&lt;br /&gt;
WINEPREFIX=~/.browsers/ie6 regedit theme.reg&lt;br /&gt;
rm -rf ies4linux-* theme.reg IEDevToolBarSetup.msi ~/.browsers/ie6/.firstrun SafariSetup.exe&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008/IRC_Scanner&amp;diff=16747</id>
		<title>Rewrite Metadata Validator/SoC 2008/IRC Scanner</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008/IRC_Scanner&amp;diff=16747"/>
				<updated>2008-06-16T08:02:29Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: Syntax highlighting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If one wants to search for his or her activity at [[IRC|the IRC channel of Creative Commons]], he or she can use [http://www.google.com/search?&amp;amp;q=john+site%3Ahttp%3A%2F%2Fmirrors.creativecommons.org%2Firc%2Fcc%2F Google] or the following public domain script written in PHP 5:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$nick = 'john';&lt;br /&gt;
$path = 'http://mirrors.creativecommons.org/irc/cc/';&lt;br /&gt;
preg_match_all('/%23cc\.'.date('Y').'\-\d\d\-\d\d\.log\.html/', file_get_contents($path), $matches);&lt;br /&gt;
$irrelevant = array();&lt;br /&gt;
if (file_exists('irrelevant.txt')) {&lt;br /&gt;
    $irrelevant = unserialize(file_get_contents('irrelevant.txt'));&lt;br /&gt;
}&lt;br /&gt;
foreach ($matches[0] as $url) {&lt;br /&gt;
    if (file_exists('relevant/'.($filename = str_replace('%23', '', $url)))&lt;br /&gt;
     || in_array($filename, $irrelevant)) {&lt;br /&gt;
        echo 'Skipped ', $filename, PHP_EOL;&lt;br /&gt;
        continue;&lt;br /&gt;
    }&lt;br /&gt;
    $contents = file_get_contents($path.$url);&lt;br /&gt;
    if (!strstr($contents, $nick.'&amp;lt;/th&amp;gt;&amp;lt;td class=&amp;quot;text&amp;quot;')) {&lt;br /&gt;
        echo 'Irrelevant ', $filename, PHP_EOL;&lt;br /&gt;
        $irrelevant[] = $filename;&lt;br /&gt;
        continue;  &lt;br /&gt;
    }&lt;br /&gt;
    file_put_contents('relevant/'.$filename, $contents);&lt;br /&gt;
    echo 'Downloaded ', $filename, PHP_EOL;&lt;br /&gt;
}&lt;br /&gt;
file_put_contents('irrelevant.txt', serialize($irrelevant));&lt;br /&gt;
echo 'Saved irrelevant.txt', PHP_EOL;&amp;lt;/source&amp;gt;&lt;br /&gt;
Please note that the herewith enclosed script searches the logs saved the current year. All relevant logs are downloaded to the local machine.&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008/Wine_Browsers_Setup&amp;diff=16737</id>
		<title>Rewrite Metadata Validator/SoC 2008/Wine Browsers Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008/Wine_Browsers_Setup&amp;diff=16737"/>
				<updated>2008-06-15T16:14:51Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If one wants to use two popular browsers (namely [http://www.apple.com/safari/ Safari] and [http://www.microsoft.com/windows/products/winfamily/ie/default.mspx Microsoft Internet Explorer] with the [http://www.microsoft.com/downloads/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;amp;displaylang=en Internet Explorer Developer Toolbar]) under [http://www.ubuntu.com/ Ubuntu] or [http://www.ubuntu.com/products/whatisubuntu/derivatives one of its flavours] to test the compatibility of his or her Web application, he or she must use [http://www.winehq.org/ Wine] for this purpose. It is important to note that in order to run Microsoft Internet Explorer under Ubuntu, one has to obtain a legal copy of [http://www.microsoft.com/windows/ Microsoft Windows]. One can also experience problems when installing Internet Explorer Developer Toolbar, because [http://www.tatanka.com.br/ies4linux/page/Main_Page IEs 4 Linux] installs Microsoft Internet Explorer 6 in such a fashion, that it runs under a simulated Microsoft Windows 98 environment, whereas the aforementioned toolbar requires Microsoft Windows 2000 or newer. If [http://www.wine-doors.org/ Wine-Doors] is used to accomplish this goal, it may suffer from [http://www.wine-doors.org/trac/ticket/723 a bug that has been closed just recently] (as of June 2008). The following public domain Bash script can be helpful to install both browsers:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
sudo apt-get install sed wget gedit wine binfmt-support msttcorefonts&lt;br /&gt;
cd ~&lt;br /&gt;
if [ ! -f ies4linux-latest.tar.gz ]&lt;br /&gt;
then&lt;br /&gt;
wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz&lt;br /&gt;
fi&lt;br /&gt;
if [ ! -f IEDevToolBarSetup.msi ]&lt;br /&gt;
then&lt;br /&gt;
wget http://download.microsoft.com/download/f/3/c/f3c93e70-ccdc-46c9-bbd4-70d94bdd0cc9/IEDevToolBarSetup.msi&lt;br /&gt;
fi&lt;br /&gt;
if [ ! -f SafariSetup.exe ]&lt;br /&gt;
then&lt;br /&gt;
wget http://appldnld.apple.com.edgesuite.net/content.info.apple.com/Safari3/061-4602.20080416.t5rGb/SafariSetup.exe&lt;br /&gt;
fi&lt;br /&gt;
if [ ! -f winetricks ]&lt;br /&gt;
then&lt;br /&gt;
wget http://www.kegel.com/wine/winetricks&lt;br /&gt;
fi&lt;br /&gt;
chmod u+x winetricks&lt;br /&gt;
cat &amp;gt; theme.reg &amp;lt;&amp;lt;'EOF'&lt;br /&gt;
Windows Registry Editor Version 5.00&lt;br /&gt;
&lt;br /&gt;
[HKEY_CURRENT_USER\Control Panel\Colors]&lt;br /&gt;
&amp;quot;ActiveBorder&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;ActiveTitle&amp;quot;=&amp;quot;10 36 106&amp;quot;&lt;br /&gt;
&amp;quot;AppWorkSpace&amp;quot;=&amp;quot;128 128 128&amp;quot;&lt;br /&gt;
&amp;quot;Background&amp;quot;=&amp;quot;58 110 165&amp;quot;&lt;br /&gt;
&amp;quot;ButtonAlternateFace&amp;quot;=&amp;quot;181 181 181&amp;quot;&lt;br /&gt;
&amp;quot;ButtonDkShadow&amp;quot;=&amp;quot;64 64 64&amp;quot;&lt;br /&gt;
&amp;quot;ButtonFace&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;ButtonHilight&amp;quot;=&amp;quot;255 255 255&amp;quot;&lt;br /&gt;
&amp;quot;ButtonLight&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;ButtonShadow&amp;quot;=&amp;quot;128 128 128&amp;quot;&lt;br /&gt;
&amp;quot;ButtonText&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
&amp;quot;GradientActiveTitle&amp;quot;=&amp;quot;166 202 240&amp;quot;&lt;br /&gt;
&amp;quot;GradientInactiveTitle&amp;quot;=&amp;quot;192 192 192&amp;quot;&lt;br /&gt;
&amp;quot;GrayText&amp;quot;=&amp;quot;128 128 128&amp;quot;&lt;br /&gt;
&amp;quot;Hilight&amp;quot;=&amp;quot;10 36 106&amp;quot;&lt;br /&gt;
&amp;quot;HilightText&amp;quot;=&amp;quot;255 255 255&amp;quot;&lt;br /&gt;
&amp;quot;HotTrackingColor&amp;quot;=&amp;quot;0 0 128&amp;quot;&lt;br /&gt;
&amp;quot;InactiveBorder&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;InactiveTitle&amp;quot;=&amp;quot;128 128 128&amp;quot;&lt;br /&gt;
&amp;quot;InactiveTitleText&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;InfoText&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
&amp;quot;InfoWindow&amp;quot;=&amp;quot;255 255 225&amp;quot;&lt;br /&gt;
&amp;quot;Menu&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;MenuBar&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;MenuHilight&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
&amp;quot;MenuText&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
&amp;quot;Scrollbar&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;TitleText&amp;quot;=&amp;quot;255 255 255&amp;quot;&lt;br /&gt;
&amp;quot;Window&amp;quot;=&amp;quot;255 255 255&amp;quot;&lt;br /&gt;
&amp;quot;WindowFrame&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
&amp;quot;WindowText&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
EOF&lt;br /&gt;
mkdir ~/.browsers&lt;br /&gt;
WINEPREFIX=~/.browsers/safari wineprefixcreate&lt;br /&gt;
WINEPREFIX=~/.browsers/safari ./winetricks corefonts vcrun2005&lt;br /&gt;
WINEPREFIX=~/.browsers/safari wine SafariSetup.exe # uncheck additional commands&lt;br /&gt;
WINEPREFIX=~/.browsers/safari wineserver -k&lt;br /&gt;
WINEPREFIX=~/.browsers/safari regedit theme.reg&lt;br /&gt;
tar zxvf ies4linux-latest.tar.gz&lt;br /&gt;
cd ies4linux-*&lt;br /&gt;
./ies4linux --no-gui --locale PL --basedir ~/.browsers&lt;br /&gt;
cd ~&lt;br /&gt;
rm -f ~/.browsers/ie6/.firstrun&lt;br /&gt;
sed -i 's/DllOverrides/DllOverridez/g;s/win98/win2k/g' ~/.browsers/ie6/user.reg&lt;br /&gt;
WINEPREFIX=~/.browsers/ie6 msiexec /i IEDevToolBarSetup.msi&amp;lt;/pre&amp;gt;&lt;br /&gt;
The following commands have to be executed afterwards:&lt;br /&gt;
&amp;lt;pre&amp;gt;sed -i 's/DllOverridez/DllOverrides/g;s/win2k/win98/g' ~/.browsers/ie6/user.reg&lt;br /&gt;
WINEPREFIX=~/.browsers/ie6 regedit theme.reg&lt;br /&gt;
rm -rf ies4linux-* theme.reg IEDevToolBarSetup.msi ~/.browsers/ie6/.firstrun SafariSetup.exe&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008&amp;diff=16736</id>
		<title>Rewrite Metadata Validator/SoC 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008&amp;diff=16736"/>
				<updated>2008-06-15T16:13:45Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: /* Helper scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Challenge]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Project]]&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Creative Commons [http://code.google.com/soc/2008/cc/about.html participates] in [http://code.google.com/soc/2008/ Google Summer of Code™] and has accepted a proposal (see the [http://code.google.com/soc/2008/cc/appinfo.html?csaid=3C284456287C63B9 abstract]) of [http://hugo.dworak.info Hugo Dworak] based on its description of a task to [[Rewrite Metadata Validator|rewrite]] its now-defunct [http://validator.creativecommons.org metadata validator]. [http://creativecommons.org/about/people/#83 Asheesh Laroia] has been assigned as a mentor of the project. The work began on May 26th, 2008 as per the [http://code.google.com/soc/2008/faqs.html#0.1_timeline project timeline].&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
A licensor or a licensee wants to check whether a digitally embedded Creative Commons license associated with a file (a Web site in particular) is valid, does not use deprecated means to express it, and matches what the user has been expecting. Therefore, one opens the Web site and either pastes the source code as a direct input, uploads a file, or provides a link to retrieve it. The software displays the results of the analysis in a human-readable manner.&lt;br /&gt;
== Proposed timeline ==&lt;br /&gt;
*Week 1 — Preparing the SVN/Git or alike repository. Installing the required framework and libraries. Setting up temporary input (source code) and output (result) facilities. Testing the Python Web environment. &lt;br /&gt;
*Week 2 — Parsing cc-related RDFa information from well-formed XHTML files.&lt;br /&gt;
*Week 3 — Parsing cc-related RDF comments embedded in the XHTML code and those put directly in &amp;quot;head&amp;quot; and &amp;quot;body&amp;quot; elements.&lt;br /&gt;
*Week 4 — Parsing cc-related RDF files linked externally or embedded in the &amp;quot;link&amp;quot; element in the header section of the XHTML.&lt;br /&gt;
*Week 5 — Parsing cc-related dc-style XHTML-conforming information (embedded in &amp;quot;meta&amp;quot; elements or anchors).&lt;br /&gt;
*Week 6 — Ability to clean up the invalid XHTML code whenever possible.&lt;br /&gt;
*'''Midterm milestone''' — Developing a raw metadata validator capable of parsing Web sites and outputting valid cc-related information about them in a human-readable fashion.&lt;br /&gt;
*Week 7 — Parsing cc-related information contained within syndication feeds (RSS 1.0, RSS 2.0, Atom 1.0).&lt;br /&gt;
*Week 8 — Ability to submit an URI to the Web site to be parsed and upload a file using a form. Auto-detection of the MIME content type of such submissions based on HTTP headers and file extension. Ability for the user to override the automatic choice.&lt;br /&gt;
*Week 9 — Traversal of embedded objects and special links to obtain more information about licensing terms.&lt;br /&gt;
*Week 10 — Generating and storing statistics about the effects of validation such as: content type, errors, means of input, types of licences.&lt;br /&gt;
*Week 11 — Extensive testing and providing automatic test suites covering all of the aforementioned capabilities.&lt;br /&gt;
*Week 12 — Writing the documentation summarising the architecture. Making the application more user-friendly. Cloning the layout of the Creative Commons Web site.&lt;br /&gt;
*'''Final milestone''' — A full-fledged Web application capable of parsing licensing information from a variety of sources.&lt;br /&gt;
== Related Web applications ==&lt;br /&gt;
* [http://validator.w3.org/ The W3C Markup Validation Service]&lt;br /&gt;
* [http://jigsaw.w3.org/css-validator/ The W3C CSS Validation Service]&lt;br /&gt;
* [http://www.w3.org/RDF/Validator/ The W3C RDF Validation Service]&lt;br /&gt;
* [http://www.w3.org/2007/08/pyRdfa/ RDFa Distiller]&lt;br /&gt;
* [http://hcs.science.uva.nl/projects/SWI-Prolog/packages/sgml/online.html Online SWI-Prolog RDF parser demo]&lt;br /&gt;
== Web framework and libraries ==&lt;br /&gt;
Once [http://www.python.org/ Python] becomes the programming language of the application, one has to decide about the software to be used in building a [http://en.wikipedia.org/wiki/Web_application Web application], so that not everything is written from scratch. First of all, the [http://en.wikipedia.org/wiki/Web_application_framework framework] which will handle the tasks that are typically found in Web applications such as the implementation of the [http://en.wikipedia.org/wiki/Model-view-controller MVC pattern], [http://en.wikipedia.org/wiki/Web_application_framework#URL_mapping URL mapping], and so on. There are several [http://wiki.python.org/moin/WebFrameworks Web application frameworks in Python], for instance [http://www.djangoproject.com/ Django] and [http://www.turbogears.org/ TurboGears]. As Creative Commons uses the BSD-like licensed [http://www.pylonshq.com/ Pylons], this is the preferred choice for the project. Pylons supports many [http://en.wikipedia.org/wiki/Web_template_system template systems], like [http://www.makotemplates.org/ Mako] and [http://jinja.pocoo.org/ Jinja], and it is our design choice to use the BSD-like licensed [http://genshi.edgewall.org/ Genshi] for this purpose.&lt;br /&gt;
&lt;br /&gt;
Other than the above, it comes to choosing Python packages to facilitate parsing and extracting information from the documents. To detect the character encoding of files provided by the users of the validator, the dual-licensed (cc-by and LGPL 3 or later) [http://cthedot.de/encutils/ encutils] shall be used. It is powered by the [http://chardet.feedparser.org/ Universal Encoding Detector] (if present) and is designed to handle XML (including XHTML and RSS) and HTML. Next, one cannot expect that the users will provide only well-formed documents, therefore [http://utidylib.berlios.de/ µTidylib] (available under a MIT-style license) and the BSD-like licensed [http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup] may be used to clean up the ill-formed mark-up, so that it can still be parsed.&lt;br /&gt;
&lt;br /&gt;
Once the document is well-formed and decoded properly, one can proceed to extracting its embedded information relevant to the license terms. It can be represented in [[Extend Metadata|numerous different ways]]. For instance, RDF data can be provided inside comments or as elements inside head and body elements. Such data can also be encoded using a [http://en.wikipedia.org/wiki/Data:_URI_scheme data: URI scheme] or linked externally using the link element. To parse RDF data one can use the BSD-like licensed [http://rdflib.net/ RDFLib], the dual-licensed (W3C Software License and GNU GPL 2 or newer) [http://infomesh.net/2003/rdfparser/ rdfxml.py], and many others. To do the same with RDFa one can employ [http://rdfa.digitalbazaar.com/librdfa/ librdfa] (which has Python bindings and is licensed under GNU LGPL 2.1 or newer) or the MIT-style licensed [http://pypi.python.org/pypi/rdfadict rdfadict].&lt;br /&gt;
== Helper scripts ==&lt;br /&gt;
The following tools have been developed in order to facilitate the accomplishment of the goal, though they are not directly related to the project:&lt;br /&gt;
* [[Rewrite_Metadata_Validator/SoC_2008/Wine_Browsers_Setup|Wine browsers setup]] — a Bash script to install [http://www.apple.com/safari/ Safari] and [http://www.microsoft.com/windows/products/winfamily/ie/default.mspx Microsoft Internet Explorer] with the [http://www.microsoft.com/downloads/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;amp;displaylang=en Internet Explorer Developer Toolbar] under [http://www.winehq.org/ Wine],&lt;br /&gt;
* [[Rewrite_Metadata_Validator/SoC_2008/IRC_Scanner|IRC Scanner]] — a PHP 5 script that searches for the occurrences of a particular nickname in the logs of [[IRC|the Creative Commons' IRC channel]].&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008&amp;diff=16735</id>
		<title>Rewrite Metadata Validator/SoC 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008&amp;diff=16735"/>
				<updated>2008-06-15T16:10:36Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: Helper scripts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Challenge]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Project]]&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Creative Commons [http://code.google.com/soc/2008/cc/about.html participates] in [http://code.google.com/soc/2008/ Google Summer of Code™] and has accepted a proposal (see the [http://code.google.com/soc/2008/cc/appinfo.html?csaid=3C284456287C63B9 abstract]) of [http://hugo.dworak.info Hugo Dworak] based on its description of a task to [[Rewrite Metadata Validator|rewrite]] its now-defunct [http://validator.creativecommons.org metadata validator]. [http://creativecommons.org/about/people/#83 Asheesh Laroia] has been assigned as a mentor of the project. The work began on May 26th, 2008 as per the [http://code.google.com/soc/2008/faqs.html#0.1_timeline project timeline].&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
A licensor or a licensee wants to check whether a digitally embedded Creative Commons license associated with a file (a Web site in particular) is valid, does not use deprecated means to express it, and matches what the user has been expecting. Therefore, one opens the Web site and either pastes the source code as a direct input, uploads a file, or provides a link to retrieve it. The software displays the results of the analysis in a human-readable manner.&lt;br /&gt;
== Proposed timeline ==&lt;br /&gt;
*Week 1 — Preparing the SVN/Git or alike repository. Installing the required framework and libraries. Setting up temporary input (source code) and output (result) facilities. Testing the Python Web environment. &lt;br /&gt;
*Week 2 — Parsing cc-related RDFa information from well-formed XHTML files.&lt;br /&gt;
*Week 3 — Parsing cc-related RDF comments embedded in the XHTML code and those put directly in &amp;quot;head&amp;quot; and &amp;quot;body&amp;quot; elements.&lt;br /&gt;
*Week 4 — Parsing cc-related RDF files linked externally or embedded in the &amp;quot;link&amp;quot; element in the header section of the XHTML.&lt;br /&gt;
*Week 5 — Parsing cc-related dc-style XHTML-conforming information (embedded in &amp;quot;meta&amp;quot; elements or anchors).&lt;br /&gt;
*Week 6 — Ability to clean up the invalid XHTML code whenever possible.&lt;br /&gt;
*'''Midterm milestone''' — Developing a raw metadata validator capable of parsing Web sites and outputting valid cc-related information about them in a human-readable fashion.&lt;br /&gt;
*Week 7 — Parsing cc-related information contained within syndication feeds (RSS 1.0, RSS 2.0, Atom 1.0).&lt;br /&gt;
*Week 8 — Ability to submit an URI to the Web site to be parsed and upload a file using a form. Auto-detection of the MIME content type of such submissions based on HTTP headers and file extension. Ability for the user to override the automatic choice.&lt;br /&gt;
*Week 9 — Traversal of embedded objects and special links to obtain more information about licensing terms.&lt;br /&gt;
*Week 10 — Generating and storing statistics about the effects of validation such as: content type, errors, means of input, types of licences.&lt;br /&gt;
*Week 11 — Extensive testing and providing automatic test suites covering all of the aforementioned capabilities.&lt;br /&gt;
*Week 12 — Writing the documentation summarising the architecture. Making the application more user-friendly. Cloning the layout of the Creative Commons Web site.&lt;br /&gt;
*'''Final milestone''' — A full-fledged Web application capable of parsing licensing information from a variety of sources.&lt;br /&gt;
== Related Web applications ==&lt;br /&gt;
* [http://validator.w3.org/ The W3C Markup Validation Service]&lt;br /&gt;
* [http://jigsaw.w3.org/css-validator/ The W3C CSS Validation Service]&lt;br /&gt;
* [http://www.w3.org/RDF/Validator/ The W3C RDF Validation Service]&lt;br /&gt;
* [http://www.w3.org/2007/08/pyRdfa/ RDFa Distiller]&lt;br /&gt;
* [http://hcs.science.uva.nl/projects/SWI-Prolog/packages/sgml/online.html Online SWI-Prolog RDF parser demo]&lt;br /&gt;
== Web framework and libraries ==&lt;br /&gt;
Once [http://www.python.org/ Python] becomes the programming language of the application, one has to decide about the software to be used in building a [http://en.wikipedia.org/wiki/Web_application Web application], so that not everything is written from scratch. First of all, the [http://en.wikipedia.org/wiki/Web_application_framework framework] which will handle the tasks that are typically found in Web applications such as the implementation of the [http://en.wikipedia.org/wiki/Model-view-controller MVC pattern], [http://en.wikipedia.org/wiki/Web_application_framework#URL_mapping URL mapping], and so on. There are several [http://wiki.python.org/moin/WebFrameworks Web application frameworks in Python], for instance [http://www.djangoproject.com/ Django] and [http://www.turbogears.org/ TurboGears]. As Creative Commons uses the BSD-like licensed [http://www.pylonshq.com/ Pylons], this is the preferred choice for the project. Pylons supports many [http://en.wikipedia.org/wiki/Web_template_system template systems], like [http://www.makotemplates.org/ Mako] and [http://jinja.pocoo.org/ Jinja], and it is our design choice to use the BSD-like licensed [http://genshi.edgewall.org/ Genshi] for this purpose.&lt;br /&gt;
&lt;br /&gt;
Other than the above, it comes to choosing Python packages to facilitate parsing and extracting information from the documents. To detect the character encoding of files provided by the users of the validator, the dual-licensed (cc-by and LGPL 3 or later) [http://cthedot.de/encutils/ encutils] shall be used. It is powered by the [http://chardet.feedparser.org/ Universal Encoding Detector] (if present) and is designed to handle XML (including XHTML and RSS) and HTML. Next, one cannot expect that the users will provide only well-formed documents, therefore [http://utidylib.berlios.de/ µTidylib] (available under a MIT-style license) and the BSD-like licensed [http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup] may be used to clean up the ill-formed mark-up, so that it can still be parsed.&lt;br /&gt;
&lt;br /&gt;
Once the document is well-formed and decoded properly, one can proceed to extracting its embedded information relevant to the license terms. It can be represented in [[Extend Metadata|numerous different ways]]. For instance, RDF data can be provided inside comments or as elements inside head and body elements. Such data can also be encoded using a [http://en.wikipedia.org/wiki/Data:_URI_scheme data: URI scheme] or linked externally using the link element. To parse RDF data one can use the BSD-like licensed [http://rdflib.net/ RDFLib], the dual-licensed (W3C Software License and GNU GPL 2 or newer) [http://infomesh.net/2003/rdfparser/ rdfxml.py], and many others. To do the same with RDFa one can employ [http://rdfa.digitalbazaar.com/librdfa/ librdfa] (which has Python bindings and is licensed under GNU LGPL 2.1 or newer) or the MIT-style licensed [http://pypi.python.org/pypi/rdfadict rdfadict].&lt;br /&gt;
== Helper scripts ==&lt;br /&gt;
The following tools have been developed in order to facilitate the accomplishment of the goal, though they are not directly related to the project:&lt;br /&gt;
* [[Rewrite_Metadata_Validator/SoC_2008/Wine_Browsers_Setup|Wine browsers setup]] — a Bash script to install [http://www.apple.com/safari/ Safari] and [http://www.microsoft.com/windows/products/winfamily/ie/default.mspx Microsoft Internet Explorer] with the [http://www.microsoft.com/downloads/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;amp;displaylang=en Internet Explorer Developer Toolbar] under [http://www.winehq.org/ Wine],&lt;br /&gt;
* [[Rewrite_Metadata_Validator/SoC_2008/IRC_Scanner|IRC Scanner]] — a PHP 5 script that searches for the occurrences of a particular nickname in the logs of [[IRC|the creative commons' IRC channel]].&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008/Wine_Browsers_Setup&amp;diff=16734</id>
		<title>Rewrite Metadata Validator/SoC 2008/Wine Browsers Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008/Wine_Browsers_Setup&amp;diff=16734"/>
				<updated>2008-06-15T15:57:14Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: Initial writing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If one wants to use two popular browsers (namely [http://www.apple.com/safari/ Safari] and [http://www.microsoft.com/windows/products/winfamily/ie/default.mspx Microsoft Internet Explorer] with [http://www.microsoft.com/downloads/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;amp;displaylang=en Internet Explorer Developer Toolbar]) under [http://www.ubuntu.com/ Ubuntu] or [http://www.ubuntu.com/products/whatisubuntu/derivatives one of its flavours] to test the compatibility of his or her Web application, he or she must use [http://www.winehq.org/ Wine] for this purpose. It is important to note that in order to run Microsoft Internet Explorer under Ubuntu, one has to obtain a legal copy of [http://www.microsoft.com/windows/ Microsoft Windows]. One can also experience problems when installing Internet Explorer Developer Toolbar, because [http://www.tatanka.com.br/ies4linux/page/Main_Page IEs 4 Linux] installs Microsoft Internet Explorer 6 in such a fashion, that it runs under a simulated Microsoft Windows 98 environment, whereas the aforementioned toolbar requires Microsoft Windows 2000 or newer. If [http://www.wine-doors.org/ Wine-Doors] is used to accomplish this goal, it may suffer from [http://www.wine-doors.org/trac/ticket/723 a bug that has been closed just recently] (as of June 2008). The following public domain Bash script can be helpful to install both browsers:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
sudo apt-get install sed wget gedit wine binfmt-support msttcorefonts&lt;br /&gt;
cd ~&lt;br /&gt;
if [ ! -f ies4linux-latest.tar.gz ]&lt;br /&gt;
then&lt;br /&gt;
wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz&lt;br /&gt;
fi&lt;br /&gt;
if [ ! -f IEDevToolBarSetup.msi ]&lt;br /&gt;
then&lt;br /&gt;
wget http://download.microsoft.com/download/f/3/c/f3c93e70-ccdc-46c9-bbd4-70d94bdd0cc9/IEDevToolBarSetup.msi&lt;br /&gt;
fi&lt;br /&gt;
if [ ! -f SafariSetup.exe ]&lt;br /&gt;
then&lt;br /&gt;
wget http://appldnld.apple.com.edgesuite.net/content.info.apple.com/Safari3/061-4602.20080416.t5rGb/SafariSetup.exe&lt;br /&gt;
fi&lt;br /&gt;
if [ ! -f winetricks ]&lt;br /&gt;
then&lt;br /&gt;
wget http://www.kegel.com/wine/winetricks&lt;br /&gt;
fi&lt;br /&gt;
chmod u+x winetricks&lt;br /&gt;
cat &amp;gt; theme.reg &amp;lt;&amp;lt;'EOF'&lt;br /&gt;
Windows Registry Editor Version 5.00&lt;br /&gt;
&lt;br /&gt;
[HKEY_CURRENT_USER\Control Panel\Colors]&lt;br /&gt;
&amp;quot;ActiveBorder&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;ActiveTitle&amp;quot;=&amp;quot;10 36 106&amp;quot;&lt;br /&gt;
&amp;quot;AppWorkSpace&amp;quot;=&amp;quot;128 128 128&amp;quot;&lt;br /&gt;
&amp;quot;Background&amp;quot;=&amp;quot;58 110 165&amp;quot;&lt;br /&gt;
&amp;quot;ButtonAlternateFace&amp;quot;=&amp;quot;181 181 181&amp;quot;&lt;br /&gt;
&amp;quot;ButtonDkShadow&amp;quot;=&amp;quot;64 64 64&amp;quot;&lt;br /&gt;
&amp;quot;ButtonFace&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;ButtonHilight&amp;quot;=&amp;quot;255 255 255&amp;quot;&lt;br /&gt;
&amp;quot;ButtonLight&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;ButtonShadow&amp;quot;=&amp;quot;128 128 128&amp;quot;&lt;br /&gt;
&amp;quot;ButtonText&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
&amp;quot;GradientActiveTitle&amp;quot;=&amp;quot;166 202 240&amp;quot;&lt;br /&gt;
&amp;quot;GradientInactiveTitle&amp;quot;=&amp;quot;192 192 192&amp;quot;&lt;br /&gt;
&amp;quot;GrayText&amp;quot;=&amp;quot;128 128 128&amp;quot;&lt;br /&gt;
&amp;quot;Hilight&amp;quot;=&amp;quot;10 36 106&amp;quot;&lt;br /&gt;
&amp;quot;HilightText&amp;quot;=&amp;quot;255 255 255&amp;quot;&lt;br /&gt;
&amp;quot;HotTrackingColor&amp;quot;=&amp;quot;0 0 128&amp;quot;&lt;br /&gt;
&amp;quot;InactiveBorder&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;InactiveTitle&amp;quot;=&amp;quot;128 128 128&amp;quot;&lt;br /&gt;
&amp;quot;InactiveTitleText&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;InfoText&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
&amp;quot;InfoWindow&amp;quot;=&amp;quot;255 255 225&amp;quot;&lt;br /&gt;
&amp;quot;Menu&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;MenuBar&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;MenuHilight&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
&amp;quot;MenuText&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
&amp;quot;Scrollbar&amp;quot;=&amp;quot;212 208 200&amp;quot;&lt;br /&gt;
&amp;quot;TitleText&amp;quot;=&amp;quot;255 255 255&amp;quot;&lt;br /&gt;
&amp;quot;Window&amp;quot;=&amp;quot;255 255 255&amp;quot;&lt;br /&gt;
&amp;quot;WindowFrame&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
&amp;quot;WindowText&amp;quot;=&amp;quot;0 0 0&amp;quot;&lt;br /&gt;
EOF&lt;br /&gt;
mkdir ~/.browsers&lt;br /&gt;
WINEPREFIX=~/.browsers/safari wineprefixcreate&lt;br /&gt;
WINEPREFIX=~/.browsers/safari ./winetricks corefonts vcrun2005&lt;br /&gt;
WINEPREFIX=~/.browsers/safari wine SafariSetup.exe # uncheck additional commands&lt;br /&gt;
WINEPREFIX=~/.browsers/safari wineserver -k&lt;br /&gt;
WINEPREFIX=~/.browsers/safari regedit theme.reg&lt;br /&gt;
tar zxvf ies4linux-latest.tar.gz&lt;br /&gt;
cd ies4linux-*&lt;br /&gt;
./ies4linux --no-gui --locale PL --basedir ~/.browsers&lt;br /&gt;
cd ~&lt;br /&gt;
rm -f ~/.browsers/ie6/.firstrun&lt;br /&gt;
sed -i 's/DllOverrides/DllOverridez/g;s/win98/win2k/g' ~/.browsers/ie6/user.reg&lt;br /&gt;
WINEPREFIX=~/.browsers/ie6 msiexec /i IEDevToolBarSetup.msi&amp;lt;/pre&amp;gt;&lt;br /&gt;
The following commands have to be executed afterwards:&lt;br /&gt;
&amp;lt;pre&amp;gt;sed -i 's/DllOverridez/DllOverrides/g;s/win2k/win98/g' ~/.browsers/ie6/user.reg&lt;br /&gt;
WINEPREFIX=~/.browsers/ie6 regedit theme.reg&lt;br /&gt;
rm -rf ies4linux-* theme.reg IEDevToolBarSetup.msi ~/.browsers/ie6/.firstrun SafariSetup.exe&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008/IRC_Scanner&amp;diff=16733</id>
		<title>Rewrite Metadata Validator/SoC 2008/IRC Scanner</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008/IRC_Scanner&amp;diff=16733"/>
				<updated>2008-06-15T15:30:13Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: Initial writing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If one wants to search for his or her activity at [[IRC|the IRC channel of Creative Commons]], he or she can use [http://www.google.com/search?&amp;amp;q=john+site%3Ahttp%3A%2F%2Fmirrors.creativecommons.org%2Firc%2Fcc%2F Google] or the following public domain script written in PHP 5:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$nick = 'john';&lt;br /&gt;
$path = 'http://mirrors.creativecommons.org/irc/cc/';&lt;br /&gt;
preg_match_all('/%23cc\.'.date('Y').'\-\d\d\-\d\d\.log\.html/', file_get_contents($path), $matches);&lt;br /&gt;
$irrelevant = array();&lt;br /&gt;
if (file_exists('irrelevant.txt')) {&lt;br /&gt;
    $irrelevant = unserialize(file_get_contents('irrelevant.txt'));&lt;br /&gt;
}&lt;br /&gt;
foreach ($matches[0] as $url) {&lt;br /&gt;
    if (file_exists('relevant/'.($filename = str_replace('%23', '', $url)))&lt;br /&gt;
     || in_array($filename, $irrelevant)) {&lt;br /&gt;
        echo 'Skipped ', $filename, PHP_EOL;&lt;br /&gt;
        continue;&lt;br /&gt;
    }&lt;br /&gt;
    $contents = file_get_contents($path.$url);&lt;br /&gt;
    if (!strstr($contents, $nick.'&amp;lt;/th&amp;gt;&amp;lt;td class=&amp;quot;text&amp;quot;')) {&lt;br /&gt;
        echo 'Irrelevant ', $filename, PHP_EOL;&lt;br /&gt;
        $irrelevant[] = $filename;&lt;br /&gt;
        continue;  &lt;br /&gt;
    }&lt;br /&gt;
    file_put_contents('relevant/'.$filename, $contents);&lt;br /&gt;
    echo 'Downloaded ', $filename, PHP_EOL;&lt;br /&gt;
}&lt;br /&gt;
file_put_contents('irrelevant.txt', serialize($irrelevant));&lt;br /&gt;
echo 'Saved irrelevant.txt', PHP_EOL;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Please note that the herewith enclosed script searches the logs saved the current year. All relevant logs are downloaded to the local machine.&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Extend_Metadata&amp;diff=16292</id>
		<title>Extend Metadata</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Extend_Metadata&amp;diff=16292"/>
				<updated>2008-06-03T19:46:18Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: /* As an element attribute */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer]]&lt;br /&gt;
[[Category:Technology]]&lt;br /&gt;
[[Category:metadata]]&lt;br /&gt;
[[Category:guide]]&lt;br /&gt;
&lt;br /&gt;
== Extending Creative Commons Metadata ==&lt;br /&gt;
&lt;br /&gt;
Familiar with RDF and want to know how this fits in with the larger picture?&lt;br /&gt;
&lt;br /&gt;
* View our [http://creativecommons/schema.rdf RDF schema] for information about [http://creativecommons.org/ns our model] in a machine-processable form.&lt;br /&gt;
* Read our report on how to use [[#Defining dc:rights|dc:rights]].&lt;br /&gt;
* Take a look at [[#Embedding RDF in HTML|our conclusions on using RDF in HTML]].&lt;br /&gt;
&lt;br /&gt;
If you've got comments or suggestions on any of this, don't hesitate to [[Contact|send us a note]].&lt;br /&gt;
&lt;br /&gt;
== Defining &amp;lt;code&amp;gt;dc:rights&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Use of the Dublin Core dc:rights element has long been fraught with confusion and misunderstanding. A study of its use in practice shows a variety of different purposes and formats with little commonality. For the Creative Commons metadata specification, we wanted to define a profile of the rights element that was more useful and structured.&lt;br /&gt;
&lt;br /&gt;
Most copyright statements consist of a statement of the date and copyright holder (i.e. &amp;quot;(C) 2002 Gnomovision Records. All rights reserved.&amp;quot;) and the actual text of the legal license. The date can be described using dc:date, the copyright holder using dc:rights and the license can be linked to with cc:license.&lt;br /&gt;
&lt;br /&gt;
We've decided to use dc:rights to hold a more structured description of the copyright holder. Here's an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;dc:rights&amp;gt;&lt;br /&gt;
  &amp;lt;Agent rdf:about=&amp;quot;http://me.yoyo.dyne.name/&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;dc:title&amp;gt;Yo-Yo Dyne&amp;lt;/dc:title&amp;gt;&lt;br /&gt;
    &amp;lt;dc:date&amp;gt;1001-10-01&amp;lt;/dc:date&amp;gt;&lt;br /&gt;
  &amp;lt;/Agent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/dc:rights&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see the copyright holder is a person with a URL, a name and a date (of birth).&lt;br /&gt;
&lt;br /&gt;
In this way we cover all the parts of the copyright notice in a way that RDF tools can deal with. As a full example, this plain text statement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(C) 2002 Gnomovision Records. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
This document has NO WARRANTY. You are permitted to &lt;br /&gt;
copy it, modify it, and place up to three (3) copies &lt;br /&gt;
of it on the White House lawn.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
becomes this chunk of RDF:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;rdf:Description&amp;gt;&lt;br /&gt;
  &amp;lt;dc:date&amp;gt;2002&amp;lt;/dc:date&amp;gt;&lt;br /&gt;
  &amp;lt;cc:license rdf:resource=&amp;quot;http://flf.org/licenses/whiteHouseLawn&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;dc:rights&amp;gt;&amp;lt;Agent&amp;gt;&lt;br /&gt;
    &amp;lt;dc:title&amp;gt;Gnomovision Records&amp;lt;/dc:title&amp;gt;&lt;br /&gt;
  &amp;lt;/Agent&amp;gt;&amp;lt;/dc:rights&amp;gt;&lt;br /&gt;
&amp;lt;/rdf:Description&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The actual text and description of the license (&amp;quot;...place up to three (3) copies...&amp;quot;) is not included in this RDF, but would presumably be available at the URL given for the license.&lt;br /&gt;
&lt;br /&gt;
== Embedding RDF in HTML ==&lt;br /&gt;
&lt;br /&gt;
There may be lots of RDF out there, but it's no good if no one can find it. Since almost everything on the Web is HTML, we need a good way to hook RDF into the HTML Web. Here are the best ways to do so:&lt;br /&gt;
&lt;br /&gt;
=== LINKing to an external file ===&lt;br /&gt;
&lt;br /&gt;
RDF can be kept in a separate file (&amp;lt;code&amp;gt;filename.rdf&amp;lt;/code&amp;gt;) and linked to using &amp;lt;code&amp;gt;&amp;lt;link rel=&amp;quot;meta&amp;quot; type=&amp;quot;application/rdf+xml&amp;quot; ... /&amp;gt;&amp;lt;/code&amp;gt; or an equivalent a href tag.&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Doesn't break anything.&lt;br /&gt;
* '''Con:''' Requires users to make files. Not supported by all readers.&lt;br /&gt;
&lt;br /&gt;
=== LINKing to a data: URL ===&lt;br /&gt;
&lt;br /&gt;
A data: URL (see [http://www.ietf.org/rfc/rfc2397.txt RFC 2397]) encapsulates data into the URL itself. If used as the &amp;lt;code&amp;gt;href&amp;lt;/code&amp;gt; attribute of a &amp;lt;code&amp;gt;&amp;lt;link&amp;gt;&amp;lt;/code&amp;gt; element, it can include an RDF document verbatim.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;link rel=&amp;quot;meta&amp;quot; type=&amp;quot;application/rdf+xml&amp;quot; href=&amp;quot;data:application/rdf+xml,%3Crdf%3ARDF%20xmlns%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2F%22%0D%0A%20%20%20%20xmlns%3Adc%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%22%0D%0A%20%20%20%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%3E%0D%0A%3CWork%20rdf%3Aabout%3D%22http%3A%2F%2Fexample.org%2Fgnomophone.mp3%22%3E%0D%0A%20%20%3Cdc%3Atitle%3ECompilers%20in%20the%20Key%20of%20C%3C%2Fdc%3Atitle%3E%0D%0A%20%20%3Cdc%3Adescription%3EA%20lovely%20classical%20work%20on%20compiling%20code.%3C%2Fdc%3Adescription%3E%0D%0A%20%20%3Cdc%3Acreator%3E%3CAgent%3E%0D%0A%20%20%20%20%3Cdc%3Atitle%3EYo-Yo%20Dyne%3C%2Fdc%3Atitle%3E%0D%0A%20%20%3C%2FAgent%3E%3C%2Fdc%3Acreator%3E%0D%0A%20%20%3Cdc%3Arights%3E%3CAgent%3E%0D%0A%20%20%20%20%3Cdc%3Atitle%3EGnomophone%3C%2Fdc%3Atitle%3E%0D%0A%20%20%3C%2FAgent%3E%3C%2Fdc%3Arights%3E%0D%0A%20%20%3Cdc%3Adate%3E1842%3C%2Fdc%3Adate%3E%0D%0A%20%20%3Cdc%3Aformat%3Eaudio%2Fmpeg%3C%2Fdc%3Aformat%3E%0D%0A%20%20%3Cdc%3Atype%20rdf%3Aresource%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Fdcmitype%2FSound%22%20%2F%3E%0D%0A%20%20%3Cdc%3Asource%20rdf%3Aresource%3D%22http%3A%2F%2Fexample.net%2Fgnomovision.mov%22%20%2F%3E%0D%0A%20%20%3Clicense%20rdf%3Aresource%3D%22http%3A%2F%2Fcreativecommons.org%2Flicenses%2Fby-nc-nd%2F2.0%2F%22%20%2F%3E%0D%0A%20%20%3Clicense%20rdf%3Aresource%3D%22http%3A%2F%2Fwww.eff.org%2FIP%2FOpen_licenses%2Feff_oal.html%22%20%2F%3E%0D%0A%0D%0A%3C%2FWork%3E%0D%0A%0D%0A%3CLicense%20rdf%3Aabout%3D%22http%3A%2F%2Fcreativecommons.org%2Flicenses%2Fby-nc-nd%2F2.0%2F%22%3E%0D%0A%20%20%3Cpermits%20rdf%3Aresource%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2FReproduction%22%20%2F%3E%0D%0A%20%20%3Cpermits%20rdf%3Aresource%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2FDistribution%22%20%2F%3E%0D%0A%20%20%3Crequires%20rdf%3Aresource%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2FNotice%22%20%2F%3E%0D%0A%20%20%3Crequires%20rdf%3Aresource%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2FAttribution%22%20%2F%3E%0D%0A%20%20%3Cprohibits%20rdf%3Aresource%3D%22http%3A%2F%2Fweb.resource.org%2Fcc%2FCommercialUse%22%20%2F%3E%0D%0A%0D%0A%3C%2FLicense%3E%0D%0A%3C%2Frdf%3ARDF%3E&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' It includes the data in the HTML document; it doesn't break old browsers; it's standard-compliant; it uses the proper element (link) for associating metadata&lt;br /&gt;
* '''Con:''' It requires the RDF to be URL-encoded; it's hard to read; not all URL libraries can recognize or decode a data: URL; Creative Commons tools ([[MozCC]], [[CcLookup]], etc) don't support it, likely browsers don't/won't support it; not a preferred method&lt;br /&gt;
&lt;br /&gt;
See also: [http://software.hixie.ch/utilities/cgi/data/data data: URI kitchen] (tool for making data: URLs), [http://www.mozilla.org/quality/networking/docs/aboutdata.html about data: URLs] (from Mozilla)&lt;br /&gt;
&lt;br /&gt;
=== In the HEAD ===&lt;br /&gt;
&lt;br /&gt;
RDF can be included inline in the &amp;lt;code&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/code&amp;gt; tag of the document, along with the title and any &amp;lt;code&amp;gt;&amp;lt;link&amp;gt;&amp;lt;/code&amp;gt;s.&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Should be ignored by browsers.&lt;br /&gt;
* '''Con:''' Not all users may be able to. Doesn't validate.&lt;br /&gt;
&lt;br /&gt;
=== In the BODY ===&lt;br /&gt;
&lt;br /&gt;
RDF can be included inline in the &amp;lt;code&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/code&amp;gt; of the document, like any other HTML.&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Super simple.&lt;br /&gt;
* '''Con:''' RDF needs to be formatted as attributes. May cause problems with some browsers. Doesn't validate.&lt;br /&gt;
&lt;br /&gt;
=== In META ===&lt;br /&gt;
&lt;br /&gt;
A reference to the license a web page is offered under may be included in a &amp;lt;code&amp;gt;&amp;lt;meta&amp;gt;&amp;lt;/code&amp;gt; tag in the document's &amp;lt;code&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;meta name=&amp;quot;DC.rights&amp;quot;&lt;br /&gt;
      scheme=&amp;quot;DCTERMS.URI&amp;quot;&lt;br /&gt;
      content=&amp;quot;http://creativecommons.org/licenses/by-sa/2.0/&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;meta name=&amp;quot;DC.rights&amp;quot;&lt;br /&gt;
      content=&amp;quot;(c) 2002 Gnomovision Records&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Won't break anything.&lt;br /&gt;
* '''Con:''' Not all users may be able to. '''Not RDF''' (included in this list due to obviousness). Limited to statements about the current page.&lt;br /&gt;
&lt;br /&gt;
Further reading: [http://dublincore.org/documents/dcq-html/ Expressing Dublin Core in HTML/XHTML meta and link elements]&lt;br /&gt;
&lt;br /&gt;
=== As an element attribute ===&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;code&amp;gt;rel=&amp;quot;license&amp;quot;&amp;lt;/code&amp;gt; attribute may be added to an &amp;quot;&amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt;&amp;quot; anchor element in HTML/XHTML. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This work is licensed under the &amp;lt;a rel=&amp;quot;license&amp;quot;&lt;br /&gt;
    href=&amp;quot;http://creativecommons.org/licenses/by/2.0/&amp;quot;&amp;gt;Creative&lt;br /&gt;
    Commons Attribution License&amp;lt;/a&amp;gt;.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Super simple, validates.&lt;br /&gt;
* '''Con:''' '''Not RDF''' (however may be used to generate RDF in a GRDDL fashion). Limited to statements about the current page.&lt;br /&gt;
&lt;br /&gt;
Further reading: [http://lists.ibiblio.org/pipermail/cc-metadata/2004-February/000290.html small-s semantic web] and CC.&lt;br /&gt;
&lt;br /&gt;
=== In a comment ===&lt;br /&gt;
&lt;br /&gt;
The RDF can be included in a &amp;lt;code&amp;gt;&amp;lt;!--comment--&amp;gt;&amp;lt;/code&amp;gt; in the document. The TrackBack system embeds its RDF in this way.&lt;br /&gt;
&lt;br /&gt;
Note that if a literal &amp;quot;--&amp;quot; is included in a comment, it must be encoded as &amp;quot;--&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* '''Pro:''' Won't break anything. Super simple.&lt;br /&gt;
* '''Con:''' Not supported by all readers. Makes people queasy.&lt;br /&gt;
&lt;br /&gt;
=== Conclusions ===&lt;br /&gt;
&lt;br /&gt;
RDF readers should support all of these methods.&lt;br /&gt;
&lt;br /&gt;
We use and recommend the &amp;quot;in the comment&amp;quot; method, since it's easy and won't break anything. Hopefully tools that don't yet support it will be upgraded to do so. Two examples: [http://www.yergler.net/projects/ccvalidator/ ccValidator] and [http://www.yergler.net/projects/mozcc/ mozCC].&lt;br /&gt;
&lt;br /&gt;
Further reading: [http://esw.w3.org/topic/EmbeddingRDFinHTML Embedding RDF in HTML]&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008&amp;diff=16289</id>
		<title>Rewrite Metadata Validator/SoC 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008&amp;diff=16289"/>
				<updated>2008-06-03T18:51:12Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: Related Web applications, Web framework and libraries&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Challenge]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Project]]&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Creative Commons [http://code.google.com/soc/2008/cc/about.html participates] in [http://code.google.com/soc/2008/ Google Summer of Code™] and has accepted a proposal (see the [http://code.google.com/soc/2008/cc/appinfo.html?csaid=3C284456287C63B9 abstract]) of [http://hugo.dworak.info Hugo Dworak] based on its description of a task to [[Rewrite Metadata Validator|rewrite]] its now-defunct [http://validator.creativecommons.org metadata validator]. [http://creativecommons.org/about/people/#83 Asheesh Laroia] has been assigned as a mentor of the project. The work began on May 26th, 2008 as per the [http://code.google.com/soc/2008/faqs.html#0.1_timeline project timeline].&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
A licensor or a licensee wants to check whether a digitally embedded Creative Commons license associated with a file (a Web site in particular) is valid, does not use deprecated means to express it, and matches what the user has been expecting. Therefore, one opens the Web site and either pastes the source code as a direct input, uploads a file, or provides a link to retrieve it. The software displays the results of the analysis in a human-readable manner.&lt;br /&gt;
== Proposed timeline ==&lt;br /&gt;
*Week 1 — Preparing the SVN/Git or alike repository. Installing the required framework and libraries. Setting up temporary input (source code) and output (result) facilities. Testing the Python Web environment. &lt;br /&gt;
*Week 2 — Parsing cc-related RDFa information from well-formed XHTML files.&lt;br /&gt;
*Week 3 — Parsing cc-related RDF comments embedded in the XHTML code and those put directly in &amp;quot;head&amp;quot; and &amp;quot;body&amp;quot; elements.&lt;br /&gt;
*Week 4 — Parsing cc-related RDF files linked externally or embedded in the &amp;quot;link&amp;quot; element in the header section of the XHTML.&lt;br /&gt;
*Week 5 — Parsing cc-related dc-style XHTML-conforming information (embedded in &amp;quot;meta&amp;quot; elements or anchors).&lt;br /&gt;
*Week 6 — Ability to clean up the invalid XHTML code whenever possible.&lt;br /&gt;
*'''Midterm milestone''' — Developing a raw metadata validator capable of parsing Web sites and outputting valid cc-related information about them in a human-readable fashion.&lt;br /&gt;
*Week 7 — Parsing cc-related information contained within syndication feeds (RSS 1.0, RSS 2.0, Atom 1.0).&lt;br /&gt;
*Week 8 — Ability to submit an URI to the Web site to be parsed and upload a file using a form. Auto-detection of the MIME content type of such submissions based on HTTP headers and file extension. Ability for the user to override the automatic choice.&lt;br /&gt;
*Week 9 — Traversal of embedded objects and special links to obtain more information about licensing terms.&lt;br /&gt;
*Week 10 — Generating and storing statistics about the effects of validation such as: content type, errors, means of input, types of licences.&lt;br /&gt;
*Week 11 — Extensive testing and providing automatic test suites covering all of the aforementioned capabilities.&lt;br /&gt;
*Week 12 — Writing the documentation summarising the architecture. Making the application more user-friendly. Cloning the layout of the Creative Commons Web site.&lt;br /&gt;
*'''Final milestone''' — A full-fledged Web application capable of parsing licensing information from a variety of sources.&lt;br /&gt;
== Related Web applications ==&lt;br /&gt;
* [http://validator.w3.org/ The W3C Markup Validation Service]&lt;br /&gt;
* [http://jigsaw.w3.org/css-validator/ The W3C CSS Validation Service]&lt;br /&gt;
* [http://www.w3.org/RDF/Validator/ The W3C RDF Validation Service]&lt;br /&gt;
* [http://www.w3.org/2007/08/pyRdfa/ RDFa Distiller]&lt;br /&gt;
* [http://hcs.science.uva.nl/projects/SWI-Prolog/packages/sgml/online.html Online SWI-Prolog RDF parser demo]&lt;br /&gt;
== Web framework and libraries ==&lt;br /&gt;
Once [http://www.python.org/ Python] becomes the programming language of the application, one has to decide about the software to be used in building a [http://en.wikipedia.org/wiki/Web_application Web application], so that not everything is written from scratch. First of all, the [http://en.wikipedia.org/wiki/Web_application_framework framework] which will handle the tasks that are typically found in Web applications such as the implementation of the [http://en.wikipedia.org/wiki/Model-view-controller MVC pattern], [http://en.wikipedia.org/wiki/Web_application_framework#URL_mapping URL mapping], and so on. There are several [http://wiki.python.org/moin/WebFrameworks Web application frameworks in Python], for instance [http://www.djangoproject.com/ Django] and [http://www.turbogears.org/ TurboGears]. As Creative Commons uses the BSD-like licensed [http://www.pylonshq.com/ Pylons], this is the preferred choice for the project. Pylons supports many [http://en.wikipedia.org/wiki/Web_template_system template systems], like [http://www.makotemplates.org/ Mako] and [http://jinja.pocoo.org/ Jinja], and it is our design choice to use the BSD-like licensed [http://genshi.edgewall.org/ Genshi] for this purpose.&lt;br /&gt;
&lt;br /&gt;
Other than the above, it comes to choosing Python packages to facilitate parsing and extracting information from the documents. To detect the character encoding of files provided by the users of the validator, the dual-licensed (cc-by and LGPL 3 or later) [http://cthedot.de/encutils/ encutils] shall be used. It is powered by the [http://chardet.feedparser.org/ Universal Encoding Detector] (if present) and is designed to handle XML (including XHTML and RSS) and HTML. Next, one cannot expect that the users will provide only well-formed documents, therefore [http://utidylib.berlios.de/ µTidylib] (available under a MIT-style license) and the BSD-like licensed [http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup] may be used to clean up the ill-formed mark-up, so that it can still be parsed.&lt;br /&gt;
&lt;br /&gt;
Once the document is well-formed and decoded properly, one can proceed to extracting its embedded information relevant to the license terms. It can be represented in [[Extend Metadata|numerous different ways]]. For instance, RDF data can be provided inside comments or as elements inside head and body elements. Such data can also be encoded using a [http://en.wikipedia.org/wiki/Data:_URI_scheme data: URI scheme] or linked externally using the link element. To parse RDF data one can use the BSD-like licensed [http://rdflib.net/ RDFLib], the dual-licensed (W3C Software License and GNU GPL 2 or newer) [http://infomesh.net/2003/rdfparser/ rdfxml.py], and many others. To do the same with RDFa one can employ [http://rdfa.digitalbazaar.com/librdfa/ librdfa] (which has Python bindings and is licensed under GNU LGPL 2.1 or newer) or the MIT-style licensed [http://pypi.python.org/pypi/rdfadict rdfadict].&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator&amp;diff=16197</id>
		<title>Rewrite Metadata Validator</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator&amp;diff=16197"/>
				<updated>2008-05-26T22:03:05Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: Work in progress (Google Summer of Code™ 2008)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Challenge&lt;br /&gt;
|related_to=CcREL&lt;br /&gt;
|challenge_type=Developer&lt;br /&gt;
|tags=gsoc, metadata&lt;br /&gt;
|is_complete=no&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Infobox|'''Work in progress'''&lt;br /&gt;
&lt;br /&gt;
A proposal based on this idea has been accepted for [http://code.google.com/soc/2008/ Google Summer of Code™ 2008] and the project is currently a work in progress. Read more about it on its [[Rewrite Metadata Validator/SoC 2008|dedicated page]].}}&lt;br /&gt;
Creative Commons historically ran a [http://validator.creativecommons.org metadata validator] (also developed in response to a challenge) which allowed users to verify they had made the correct assertions about their work.  Since moving to [[RDFa]], the validator has become less relevant and is in need of a major overhaul (perhaps even rewrite).  &lt;br /&gt;
&lt;br /&gt;
A minimal implementation will:&lt;br /&gt;
&lt;br /&gt;
* support all recommended methods, historical and current, of embedding CC license information in a web page (see the [[HTML|file format page]] for more information)&lt;br /&gt;
* alert users that embedding using historical methods has been deprecated&lt;br /&gt;
* support making assertions about embedded objects&lt;br /&gt;
&lt;br /&gt;
An awesome implementation will:&lt;br /&gt;
&lt;br /&gt;
* support validating CC license inclusion in non-HTML formats (ie, [[Syndication]] feeds), auto-detecting the validation suite to use basic on returned content-type and allowing users to override if necessary&lt;br /&gt;
* traverse special links (ie, [[CcPlus|cc:morePermissions]], [[ccREL|cc:attributionURL]], [[Web Statement|xmpRights:WebStatement]]) looking for additional metadata to provide a complete picture of the published metadata.&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	<entry>
		<id>https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008&amp;diff=16196</id>
		<title>Rewrite Metadata Validator/SoC 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.creativecommons.org/index.php?title=Rewrite_Metadata_Validator/SoC_2008&amp;diff=16196"/>
				<updated>2008-05-26T21:37:49Z</updated>
		
		<summary type="html">&lt;p&gt;Hdworak: New page: Category:Challenge Category:Developer Category:Metadata Category:Opensource Category:Project == Introduction == Creative Commons [http://code.google.com/soc/2008/cc/abo...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Challenge]]&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:Opensource]]&lt;br /&gt;
[[Category:Project]]&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Creative Commons [http://code.google.com/soc/2008/cc/about.html participates] in [http://code.google.com/soc/2008/ Google Summer of Code™] and has accepted a proposal (see the [http://code.google.com/soc/2008/cc/appinfo.html?csaid=3C284456287C63B9 abstract]) of [http://hugo.dworak.info Hugo Dworak] based on its description of a task to [[Rewrite Metadata Validator|rewrite]] its now-defunct [http://validator.creativecommons.org metadata validator]. [http://creativecommons.org/about/people/#83 Asheesh Laroia] has been assigned as a mentor of the project. The work began on May 26th, 2008 as per the [http://code.google.com/soc/2008/faqs.html#0.1_timeline project timeline].&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
A licensor or a licensee wants to check whether a digitally embedded Creative Commons license associated with a file (a Web site in particular) is valid, does not use deprecated means to express it, and matches what the user has been expecting. Therefore, one opens the Web site and either pastes the source code as a direct input, uploads a file, or provides a link to retrieve it. The software displays the results of the analysis in a human-readable manner.&lt;br /&gt;
== Proposed timeline ==&lt;br /&gt;
*Week 1 — Preparing the SVN/Git or alike repository. Installing the required framework and libraries. Setting up temporary input (source code) and output (result) facilities. Testing the Python Web environment. &lt;br /&gt;
*Week 2 — Parsing cc-related RDFa information from well-formed XHTML files.&lt;br /&gt;
*Week 3 — Parsing cc-related RDF comments embedded in the XHTML code and those put directly in &amp;quot;head&amp;quot; and &amp;quot;body&amp;quot; elements.&lt;br /&gt;
*Week 4 — Parsing cc-related RDF files linked externally or embedded in the &amp;quot;link&amp;quot; element in the header section of the XHTML.&lt;br /&gt;
*Week 5 — Parsing cc-related dc-style XHTML-conforming information (embedded in &amp;quot;meta&amp;quot; elements or anchors).&lt;br /&gt;
*Week 6 — Ability to clean up the invalid XHTML code whenever possible.&lt;br /&gt;
*'''Midterm milestone''' — Developing a raw metadata validator capable of parsing Web sites and outputting valid cc-related information about them in a human-readable fashion.&lt;br /&gt;
*Week 7 — Parsing cc-related information contained within syndication feeds (RSS 1.0, RSS 2.0, Atom 1.0).&lt;br /&gt;
*Week 8 — Ability to submit an URI to the Web site to be parsed and upload a file using a form. Auto-detection of the MIME content type of such submissions based on HTTP headers and file extension. Ability for the user to override the automatic choice.&lt;br /&gt;
*Week 9 — Traversal of embedded objects and special links to obtain more information about licensing terms.&lt;br /&gt;
*Week 10 — Generating and storing statistics about the effects of validation such as: content type, errors, means of input, types of licences.&lt;br /&gt;
*Week 11 — Extensive testing and providing automatic test suites covering all of the aforementioned capabilities.&lt;br /&gt;
*Week 12 — Writing the documentation summarising the architecture. Making the application more user-friendly. Cloning the layout of the Creative Commons Web site.&lt;br /&gt;
*'''Final milestone''' — A full-fledged Web application capable of parsing licensing information from a variety of sources.&lt;/div&gt;</summary>
		<author><name>Hdworak</name></author>	</entry>

	</feed>