<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://townx.org" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>townx - Example of how to put RDFa into an HTML list - Comments</title>
 <link>http://townx.org/blog/elliot/example-how-put-rdfa-html-list</link>
 <description>Comments for &quot;Example of how to put RDFa into an HTML list&quot;</description>
 <language>en</language>
<item>
 <title>Belgravia Villas has full</title>
 <link>http://townx.org/blog/elliot/example-how-put-rdfa-html-list#comment-46060</link>
 <description>&lt;p&gt;Belgravia Villas has full and unique facilities, which includes a guard house, clubhouse, children&#039;s playground, swimming pool, piano room, pool room, indoor gym, hydrotherapy beds, hydrotherapy baths, reading room, function room, onsen, jacuzzi.&lt;br /&gt;
The condo’s facilities provide full family entertainment needs for your family and loved ones. Indulge in a serene and tranquil lifestyle right in the heart of Ang Mo Kio.&lt;br /&gt;
&lt;a href=&quot;http://belgravia-villa.com.sg/project-details&quot;&gt;Belgravia Villas Project Details&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Fri, 26 Apr 2013 01:14:35 -0500</pubDate>
 <dc:creator>Guest</dc:creator>
 <guid isPermaLink="false">comment 46060 at http://townx.org</guid>
</item>
<item>
 <title>reply</title>
 <link>http://townx.org/blog/elliot/example-how-put-rdfa-html-list#comment-44227</link>
 <description>&lt;p&gt;Please be sure to persist with ad this sort of level of quality articles or reviews because this is a rare thing to discover nowadays. I&#039;m certainly invariably searching on the internet with regard to articles that will aid everyone. Getting excited about another excellent web log. Everyone to your novelist! all the best! &lt;br /&gt;
&lt;a href=&quot;http://www.code-promo-coupon.com/3suisses&quot;&gt;nada&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sat, 29 Dec 2012 05:40:07 -0600</pubDate>
 <dc:creator>nada</dc:creator>
 <guid isPermaLink="false">comment 44227 at http://townx.org</guid>
</item>
<item>
 <title>question</title>
 <link>http://townx.org/blog/elliot/example-how-put-rdfa-html-list#comment-41200</link>
 <description>&lt;p&gt;Hi&lt;br /&gt;
Im studing and working in e-commerce technologies, lately im interested in semantic web technologies. i am trying to write an (X)HTML form to catch data from user, and also i want to annotate it in a way that we can extract &lt;span class=&quot;caps&quot;&gt;RDF &lt;/span&gt;statements from that (x)html form i.e. im trying to annotate an (X)HTML form then extract &lt;span class=&quot;caps&quot;&gt;RDF &lt;/span&gt;triple of it(via w3c &lt;span class=&quot;caps&quot;&gt;RDF &lt;/span&gt;validatore). I have encountered some problems in implementation. do you know how can i do that? i even searched for some example but i could not find anything. i appreciate your helping. im waiting for reply. &lt;br /&gt;
Best Regards &lt;/p&gt;</description>
 <pubDate>Sat, 08 Jan 2011 12:12:51 -0600</pubDate>
 <dc:creator>reza</dc:creator>
 <guid isPermaLink="false">comment 41200 at http://townx.org</guid>
</item>
<item>
 <title>Example of how to put RDFa into an HTML list</title>
 <link>http://townx.org/blog/elliot/example-how-put-rdfa-html-list</link>
 <description>&lt;p&gt;I&#039;m not going to try to explain &lt;a href=&quot;http://www.w3.org/TR/rdf-primer/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;RDF&lt;/span&gt;&lt;/a&gt; and/or &lt;a href=&quot;http://www.w3.org/TR/xhtml-rdfa-primer/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;RDF&lt;/span&gt;a&lt;/a&gt; here, but thought any poor suckers looking for &lt;span class=&quot;caps&quot;&gt;RDF&lt;/span&gt;a examples might benefit from me posting what I finally worked out, with help from my colleague &lt;a href=&quot;http://dynamicorange.com/&quot;&gt;Rob&lt;/a&gt;. Namely, how to annotate an &lt;span class=&quot;caps&quot;&gt;HTML &lt;/span&gt;ordered list (&amp;lt;ol&amp;gt;) with &lt;span class=&quot;caps&quot;&gt;RDF&lt;/span&gt;a attributes; and how to put &lt;span class=&quot;caps&quot;&gt;RDF&lt;/span&gt;a attributes onto form elements.&lt;/p&gt;

&lt;p&gt;Here&#039;s the &lt;span class=&quot;caps&quot;&gt;HTML &lt;/span&gt;page with &lt;span class=&quot;caps&quot;&gt;RDF&lt;/span&gt;a embedded in it. What I&#039;m representing here is a sequence of collections, and the individual collections within it:&lt;/p&gt;



&lt;pre&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML+RDFa 1.0//EN&amp;quot; &amp;quot;http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd&amp;quot;&amp;gt;
&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;Collections&amp;lt;/title&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;h1&amp;gt;Collections&amp;lt;/h1&amp;gt;
    &amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;http://receptacular.org/collections&amp;quot;&amp;gt;
      &amp;lt;ol xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot; xmlns:rdfs=&amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot; xmlns:rdf=&amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot; xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot; xmlns:rec=&amp;quot;http://receptacular.org/schema#&amp;quot; typeof=&amp;quot;rdf:Seq&amp;quot; about=&amp;quot;http://receptacular.org/collections&amp;quot;&amp;gt;
        &amp;lt;li rel=&amp;quot;rdf:_1&amp;quot; resource=&amp;quot;http://receptacular.org/collections/1&amp;quot;&amp;gt;
          &amp;lt;span style=&amp;quot;display:none;&amp;quot; rel=&amp;quot;rdf:type&amp;quot; resource=&amp;quot;http://receptacular.org/schema#Collection&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;
          &amp;lt;div class=&amp;quot;collection-label&amp;quot; property=&amp;quot;rdfs:label&amp;quot;&amp;gt;Vague Collection&amp;lt;/div&amp;gt;
          &amp;lt;input type=&amp;quot;checkbox&amp;quot; id=&amp;quot;collections-1-hidden&amp;quot; property=&amp;quot;rec:hidden&amp;quot; datatype=&amp;quot;xsd:boolean&amp;quot; content=&amp;quot;false&amp;quot;/&amp;gt;
          &amp;lt;label for=&amp;quot;collections-1-hidden&amp;quot;&amp;gt;hidden&amp;lt;/label&amp;gt;
          &amp;lt;input type=&amp;quot;checkbox&amp;quot; id=&amp;quot;collections-1-defaultSearch&amp;quot; property=&amp;quot;rec:defaultSearch&amp;quot; datatype=&amp;quot;xsd:boolean&amp;quot; content=&amp;quot;false&amp;quot;/&amp;gt;
          &amp;lt;label for=&amp;quot;collections-1-defaultSearch&amp;quot;&amp;gt;use for searches&amp;lt;/label&amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li rel=&amp;quot;rdf:_2&amp;quot; resource=&amp;quot;http://receptacular.org/collections/2&amp;quot;&amp;gt;
          &amp;lt;span style=&amp;quot;display:none;&amp;quot; rel=&amp;quot;rdf:type&amp;quot; resource=&amp;quot;http://receptacular.org/schema#Collection&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;
          &amp;lt;div class=&amp;quot;collection-label&amp;quot; property=&amp;quot;rdfs:label&amp;quot;&amp;gt;Archive Collection&amp;lt;/div&amp;gt;
          &amp;lt;input type=&amp;quot;checkbox&amp;quot; id=&amp;quot;collections-2-hidden&amp;quot; property=&amp;quot;rec:hidden&amp;quot; datatype=&amp;quot;xsd:boolean&amp;quot; content=&amp;quot;false&amp;quot;/&amp;gt;
          &amp;lt;label for=&amp;quot;collections-2-hidden&amp;quot;&amp;gt;hidden&amp;lt;/label&amp;gt;
          &amp;lt;input type=&amp;quot;checkbox&amp;quot; id=&amp;quot;collections-2-defaultSearch&amp;quot; property=&amp;quot;rec:defaultSearch&amp;quot; datatype=&amp;quot;xsd:boolean&amp;quot; content=&amp;quot;false&amp;quot;/&amp;gt;
          &amp;lt;label for=&amp;quot;collections-2-defaultSearch&amp;quot;&amp;gt;use for searches&amp;lt;/label&amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li rel=&amp;quot;rdf:_3&amp;quot; resource=&amp;quot;http://receptacular.org/collections/3&amp;quot;&amp;gt;
          &amp;lt;span style=&amp;quot;display:none;&amp;quot; rel=&amp;quot;rdf:type&amp;quot; resource=&amp;quot;http://receptacular.org/schema#Collection&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;
          &amp;lt;div class=&amp;quot;collection-label&amp;quot; property=&amp;quot;rdfs:label&amp;quot;&amp;gt;Main Collection&amp;lt;/div&amp;gt;
          &amp;lt;input type=&amp;quot;checkbox&amp;quot; id=&amp;quot;collections-3-hidden&amp;quot; property=&amp;quot;rec:hidden&amp;quot; datatype=&amp;quot;xsd:boolean&amp;quot; content=&amp;quot;true&amp;quot; checked=&amp;quot;checked&amp;quot;/&amp;gt;
          &amp;lt;label for=&amp;quot;collections-3-hidden&amp;quot;&amp;gt;hidden&amp;lt;/label&amp;gt;
          &amp;lt;input type=&amp;quot;checkbox&amp;quot; id=&amp;quot;collections-3-defaultSearch&amp;quot; property=&amp;quot;rec:defaultSearch&amp;quot; datatype=&amp;quot;xsd:boolean&amp;quot; content=&amp;quot;true&amp;quot; checked=&amp;quot;checked&amp;quot;/&amp;gt;
          &amp;lt;label for=&amp;quot;collections-3-defaultSearch&amp;quot;&amp;gt;use for searches&amp;lt;/label&amp;gt;
        &amp;lt;/li&amp;gt;
      &amp;lt;/ol&amp;gt;
      &amp;lt;p&amp;gt;
        &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Save&amp;quot; id=&amp;quot;save-collections&amp;quot;/&amp;gt;
      &amp;lt;/p&amp;gt;
    &amp;lt;/form&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;



&lt;p&gt;Available online here: &lt;a href=&quot;http://receptacular.org/collections&quot; title=&quot;http://receptacular.org/collections&quot;&gt;http://receptacular.org/collections&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Things of note:&lt;/p&gt;


&lt;ul&gt;
&lt;li&gt;The doctype declaration. This is the &lt;span class=&quot;caps&quot;&gt;W3C &lt;/span&gt;sanctioned doctype for &lt;span class=&quot;caps&quot;&gt;XHTML&lt;/span&gt;+RDFa pages. By the way, the &lt;span class=&quot;caps&quot;&gt;W3C &lt;/span&gt;validator will correctly validate this page, but standard &lt;span class=&quot;caps&quot;&gt;XHTML &lt;/span&gt;validators don&#039;t (e.g. like &quot;this one&quot;http://nutrun.com/weblog/xhtmlvalidator-validate-xhtml-in-java/:). That&#039;s another story...&lt;/li&gt;
&lt;li&gt;Namespace declarations on the &amp;lt;ol&amp;gt; element wrapping the list items. This is what causes standard &lt;span class=&quot;caps&quot;&gt;XHTML &lt;/span&gt;validation approaches to fail.&lt;/li&gt;
&lt;li&gt;The &amp;lt;ol&amp;gt; element is defined with &lt;strong&gt;typeof=&quot;rdf:Seq&quot;&lt;/strong&gt; and &lt;strong&gt;about=&quot;http://receptacular.org/collections&quot;&lt;/strong&gt;. This sets it up as the &lt;span class=&quot;caps&quot;&gt;RDF&lt;/span&gt; Seq resource.&lt;/li&gt;
&lt;li&gt;The &amp;lt;li&amp;gt; elements inside the &amp;lt;ol&amp;gt; are Seq items, within the wrapping Seq resource. Each is each defined as a resource using the &lt;strong&gt;resource&lt;/strong&gt; attribute. They are linked back to the enclosing &amp;lt;ol&amp;gt; element using the &lt;strong&gt;rel&lt;/strong&gt; attribute on each. Note that the value for the &lt;strong&gt;rel&lt;/strong&gt; attribute is an rdf Seq number, which orders the items within the enclosing Seq resource.&lt;/li&gt;
&lt;li&gt;The &lt;span class=&quot;caps&quot;&gt;RDF &lt;/span&gt;type of each Seq item is set using a hidden &amp;lt;span&amp;gt; element. Note that these elements have no text in them, but have opening and closing tags. If you just use a self-closing start tag for this element, the &lt;span class=&quot;caps&quot;&gt;HTML &lt;/span&gt;doesn&#039;t display property. &lt;/li&gt;
&lt;li&gt;The &amp;lt;span&amp;gt; elements use the &lt;strong&gt;rel&lt;/strong&gt; attribute to mark their &lt;span class=&quot;caps&quot;&gt;RDF &lt;/span&gt;type relationship to the outer list item; and the &lt;strong&gt;resource&lt;/strong&gt; attribute to specify the location of the resource representing their type.&lt;/li&gt;
&lt;li&gt;Each Seq item has an enclosed &amp;lt;div&amp;gt; which represents its &lt;strong&gt;rdfs:label&lt;/strong&gt; property. Note that the &lt;strong&gt;property&lt;/strong&gt; RDFa attribute is used to specify which property of the enclosing resource is being defined. Also note that the value of the property is inlined between the start and end tags of the &amp;lt;div&amp;gt;.&lt;/li&gt;
&lt;li&gt;The two checkboxes define two more properties for each Seq resource: &lt;strong&gt;rec:hidden&lt;/strong&gt; and &lt;strong&gt;rec:defaultSearch&lt;/strong&gt;. (The semantics of the properties aren&#039;t discussed here, as I&#039;m concentrating on syntax.) Each is defined on a standard &lt;span class=&quot;caps&quot;&gt;XHTML &lt;/span&gt;&amp;lt;input&amp;gt; element: the relationship to the enclosing Seq item is defined with the &lt;strong&gt;property&lt;/strong&gt; attribute; the value of the property is defined using the &lt;strong&gt;content&lt;/strong&gt; attribute; and the data type of the literal value is defined via the &lt;strong&gt;datatype&lt;/strong&gt; attribute. Any of the standard &lt;span class=&quot;caps&quot;&gt;XML &lt;/span&gt;datatypes could be used here, or other types from other schemas.&lt;/li&gt;
&lt;li&gt;When working with form elements which represent property values for &lt;span class=&quot;caps&quot;&gt;RDF &lt;/span&gt;resources, you may need to change the &lt;strong&gt;content&lt;/strong&gt; attribute in response to UI changes. (In the application from which this example was extracted, we use &lt;a href=&quot;http://jquery.com/&quot;&gt;JQuery&lt;/a&gt; to respond to changes in the check box which set the &lt;strong&gt;content&lt;/strong&gt; attribute.)&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;To see the &lt;span class=&quot;caps&quot;&gt;RDF &lt;/span&gt;which can be extracted from this page, you can use the &lt;span class=&quot;caps&quot;&gt;W3C&#039;&lt;/span&gt;s &lt;a href=&quot;http://www.w3.org/2007/08/pyRdfa/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;RDF&lt;/span&gt;a Distiller&lt;/a&gt;. Here&#039;s the resulting &lt;span class=&quot;caps&quot;&gt;RDF&lt;/span&gt;:&lt;/p&gt;



&lt;pre&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;
&amp;lt;rdf:RDF
  xmlns:dist=&amp;quot;http://www.w3.org/2007/08/pyRdfa/distiller#&amp;quot;
  xmlns:rdf=&amp;quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;quot;
  xmlns:rdfs=&amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;
  xmlns:rec=&amp;quot;http://receptacular.org/schema#&amp;quot;
  xmlns:xhv=&amp;quot;http://www.w3.org/1999/xhtml/vocab#&amp;quot;
  xmlns:xml=&amp;quot;http://www.w3.org/XML/1998/namespace&amp;quot;
  xmlns:xsd=&amp;quot;http://www.w3.org/2001/XMLSchema#&amp;quot;
&amp;gt;
  &amp;lt;rdf:Seq rdf:about=&amp;quot;http://receptacular.org/collections&amp;quot;&amp;gt;
    &amp;lt;rdf:_1&amp;gt;
      &amp;lt;rec:Collection rdf:about=&amp;quot;http://receptacular.org/collections/1&amp;quot;&amp;gt;
        &amp;lt;rec:hidden rdf:datatype=&amp;quot;http://www.w3.org/2001/XMLSchema#boolean&amp;quot;&amp;gt;false&amp;lt;/rec:hidden&amp;gt;
        &amp;lt;rec:defaultSearch rdf:datatype=&amp;quot;http://www.w3.org/2001/XMLSchema#boolean&amp;quot;&amp;gt;false&amp;lt;/rec:defaultSearch&amp;gt;
        &amp;lt;rdfs:label&amp;gt;Vague Collection&amp;lt;/rdfs:label&amp;gt;
      &amp;lt;/rec:Collection&amp;gt;
    &amp;lt;/rdf:_1&amp;gt;
    &amp;lt;rdf:_2&amp;gt;
      &amp;lt;rec:Collection rdf:about=&amp;quot;http://receptacular.org/collections/2&amp;quot;&amp;gt;
        &amp;lt;rec:hidden rdf:datatype=&amp;quot;http://www.w3.org/2001/XMLSchema#boolean&amp;quot;&amp;gt;false&amp;lt;/rec:hidden&amp;gt;
        &amp;lt;rec:defaultSearch rdf:datatype=&amp;quot;http://www.w3.org/2001/XMLSchema#boolean&amp;quot;&amp;gt;false&amp;lt;/rec:defaultSearch&amp;gt;
        &amp;lt;rdfs:label&amp;gt;Archive Collection&amp;lt;/rdfs:label&amp;gt;
      &amp;lt;/rec:Collection&amp;gt;
    &amp;lt;/rdf:_2&amp;gt;
    &amp;lt;rdf:_3&amp;gt;
      &amp;lt;rec:Collection rdf:about=&amp;quot;http://receptacular.org/collections/3&amp;quot;&amp;gt;
        &amp;lt;rec:hidden rdf:datatype=&amp;quot;http://www.w3.org/2001/XMLSchema#boolean&amp;quot;&amp;gt;true&amp;lt;/rec:hidden&amp;gt;
        &amp;lt;rec:defaultSearch rdf:datatype=&amp;quot;http://www.w3.org/2001/XMLSchema#boolean&amp;quot;&amp;gt;true&amp;lt;/rec:defaultSearch&amp;gt;
        &amp;lt;rdfs:label&amp;gt;Main Collection&amp;lt;/rdfs:label&amp;gt;
      &amp;lt;/rec:Collection&amp;gt;
    &amp;lt;/rdf:_3&amp;gt;
  &amp;lt;/rdf:Seq&amp;gt;
&amp;lt;/rdf:RDF&amp;gt;
&lt;/pre&gt;



&lt;p&gt;Saving changes to an &lt;span class=&quot;caps&quot;&gt;RDF&lt;/span&gt;a-enabled form like this is another challenge, for which we used &lt;a href=&quot;http://code.google.com/p/rdfquery/&quot;&gt;rdfquery&lt;/a&gt;, and &lt;span class=&quot;caps&quot;&gt;RDF &lt;/span&gt;library for JQuery. (I recommend you use the latest svn &lt;span class=&quot;caps&quot;&gt;HEAD &lt;/span&gt;version of this library, as older versions have a bug where they ignore &lt;span class=&quot;caps&quot;&gt;RDF&lt;/span&gt;a elements nested inside elements without &lt;span class=&quot;caps&quot;&gt;RDF&lt;/span&gt;a attributes.) Maybe I&#039;ll get round to that another time.&lt;/p&gt;</description>
 <comments>http://townx.org/blog/elliot/example-how-put-rdfa-html-list#comments</comments>
 <category domain="http://townx.org/tech">tech</category>
 <category domain="http://townx.org/howtos">howtos</category>
 <pubDate>Tue, 30 Jun 2009 04:52:35 -0500</pubDate>
 <dc:creator>elliot</dc:creator>
 <guid isPermaLink="false">779 at http://townx.org</guid>
</item>
</channel>
</rss>
