<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tudor Barbu&#039;s professional blog &#187; semantic web</title>
	<atom:link href="http://blog.motane.lu/tag/semantic-web/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.motane.lu</link>
	<description>Ramblings about software development</description>
	<lastBuildDate>Thu, 02 Feb 2012 17:38:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Microformats</title>
		<link>http://blog.motane.lu/2009/04/01/microformats/</link>
		<comments>http://blog.motane.lu/2009/04/01/microformats/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 05:51:30 +0000</pubDate>
		<dc:creator>Tudor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[microformats]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[resume]]></category>
		<category><![CDATA[semantic web]]></category>

		<guid isPermaLink="false">http://blog.motane.lu/?p=586</guid>
		<description><![CDATA[After attending the PHP GeekMeet in Cluj, I&#8217;ve talked briefly with Andrei Gheorghe and remembered a presentation that he held some time ago at Wurbe, about Microformats. Well, what can I say? Microformats are cool idea, that will allow scripts to better retrieve the information from the Internet. Of course, if people actually use them. [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.motane.lu/wp-content/uploads/2009/04/hresume.png" alt="hResume" title="hResume" width="116" height="115" class="alignleft size-full wp-image-601" /> After attending the PHP GeekMeet in Cluj, I&#8217;ve talked briefly with <a href="http://idevelop.ro" title="Andrei Gheorghe's blog" class="outgoing">Andrei Gheorghe</a> and remembered a presentation that he held some time ago at <a href="http://wurbe.ro/" title="Wurbe" class="outgoing">Wurbe</a>, about <a href="http://microformats.org/wiki/Main_Page" title="Microformats" class="outgoing">Microformats</a>. </p>
<p>Well, what can I say? Microformats are cool idea, that will allow scripts to better retrieve the information from the Internet. Of course, if people actually use them.  So I&#8217;ve decided to be among the pioneers in this matter and post my own resume on the web, formatted as hResume. <a href="http://resume.motane.lu" title="Tudor Barbu's resume">Here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.motane.lu/2009/04/01/microformats/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Semantics &#8211; input type=&#8221;submit&#8221; vs. button</title>
		<link>http://blog.motane.lu/2009/03/06/semantics-input-typesubmit-vs-button/</link>
		<comments>http://blog.motane.lu/2009/03/06/semantics-input-typesubmit-vs-button/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 21:03:54 +0000</pubDate>
		<dc:creator>Tudor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[semantic web]]></category>
		<category><![CDATA[versus]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://blog.motane.lu/?p=514</guid>
		<description><![CDATA[What&#8217;s the difference between: &#8230;and&#8230; Apparently none. Both snippets look and act exactly the same way. And yet, there is a more subtle difference. The difference lies in the semantics and in the meaning of the two types of buttons. A &#60;button&#62; tag displays a button, that you can click with your mouse and can [...]]]></description>
			<content:encoded><![CDATA[<p>What&#8217;s the difference between:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;form action=&quot;/foo&quot; method=&quot;post&quot;&gt;
    &lt;!-- other form fields --&gt;
    &lt;input type=&quot;submit&quot; value=&quot;Send data&quot; /&gt;
&lt;/form&gt;
</pre>
<p>&#8230;and&#8230;</p>
<pre class="brush: xml; title: ; notranslate">
&lt;form action=&quot;/foo&quot; method=&quot;post&quot;&gt;
    &lt;!-- other form fields --&gt;
    &lt;button type=&quot;submit&quot;&gt;
        Send data
    &lt;/button&gt;
&lt;/form&gt;
</pre>
<p>Apparently none. Both snippets look and act exactly the same way. And yet, there is a more subtle difference. The difference lies in the semantics and in the meaning of the two types of buttons. A &lt;button&gt; tag displays a button, that you can click with your mouse and can be placed almost anywhere on a page. That&#8217;s all. It doesn&#8217;t have a purpose. </p>
<p>An &lt;input type=&#8221;submit&#8221; &gt; on the other hand does a lot more. It&#8217;s a form element &#8211; can only appear in a form &#8211; and it has meaning attached to it. When you submit a form by clicking on such an button, the value of the button is being sent along with the values of all the other form elements to the server. </p>
<pre class="brush: xml; title: ; notranslate">
&lt;form action=&quot;/foo&quot; method=&quot;post&quot;&gt;
    &lt;input type=&quot;checkbox&quot; name=&quot;item[]&quot; value=&quot;1&quot; id=&quot;item_1&quot; /&gt; &lt;label for=&quot;item_1&quot;&gt;First item&lt;/label&gt;
    &lt;input type=&quot;checkbox&quot; name=&quot;item[]&quot; value=&quot;2&quot; id=&quot;item_2&quot; /&gt; &lt;label for=&quot;item_2&quot;&gt;Second item&lt;/label&gt;
    &lt;input type=&quot;checkbox&quot; name=&quot;item[]&quot; value=&quot;3&quot; id=&quot;item_3&quot; /&gt; &lt;label for=&quot;item_3&quot;&gt;Third item&lt;/label&gt;
    With selected: &lt;input type=&quot;submit&quot; name=&quot;delete&quot; value=&quot;Delete&quot; /&gt; &lt;input type=&quot;submit&quot; name=&quot;archive&quot; value=&quot;Move to archive&quot; /&gt;
&lt;/form&gt;
</pre>
<p>In this case it matters on which button the user clicks, so an input type=&#8221;submit&#8221; tag is the best choice. But when you have something like:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;form action=&quot;/foo&quot; method=&quot;post&quot;&gt;
    &lt;input type=&quot;text&quot; name=&quot;email&quot; /&gt;
    &lt;button type=&quot;submit&quot;&gt;
        Subscribe to newsletter
    &lt;/button&gt;
&lt;/form&gt;
</pre>
<p>&#8230;it doesn&#8217;t! So here the button tag is best suited.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.motane.lu/2009/03/06/semantics-input-typesubmit-vs-button/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Semantic FAQs</title>
		<link>http://blog.motane.lu/2009/01/26/semantic-faqs/</link>
		<comments>http://blog.motane.lu/2009/01/26/semantic-faqs/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 19:47:42 +0000</pubDate>
		<dc:creator>Tudor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[semantic web]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://blog.motane.lu/?p=110</guid>
		<description><![CDATA[You know the saying it&#8217;s funny because is true? Well it also applies to software development. This drawing it&#8217;s funny because is true. And when &#8211; not if, when &#8211; your application will start looking like that, it&#8217;s obvious that you&#8217;ll need a FAQ section. Usually, people use tables or other types of markup for [...]]]></description>
			<content:encoded><![CDATA[<p>You know the saying <em>it&#8217;s funny because is true</em>? Well it also applies to software development. This drawing <a href="http://stuffthathappens.com/blog/2008/03/05/simplicity/" title="Simplicity" class="outgoing">it&#8217;s funny because is true</a>. And when &#8211; not if, when &#8211; your application will start looking like that, it&#8217;s obvious that you&#8217;ll need a <acronym title="Frequently Asked Questions">FAQ</acronym> section. </p>
<p>Usually, people use tables or other types of markup for setting up the FAQ page, but the proper way to code it is the long forgotten <a href="http://www.w3.org/TR/2004/WD-xhtml2-20040722/mod-list.html#sec_11.1.">definition list</a>. When it comes to semantics, this is the perfect choice. The questions in the FAQ represent the definition terms and their answers the definition data.</p>
<p>The proper xhtml code for the FAQ page should look like this&#8230;</p>
<pre class="brush: xml; title: ; notranslate">
&lt;dl&gt;
    &lt;dt&gt;How do I...?&lt;/dt&gt;
    &lt;dd&gt;Just click the ... button!&lt;/dd&gt;
    &lt;dt&gt;Are your sure?&lt;/dt&gt;
    &lt;dd&gt;Positive!&lt;/dd&gt;
&lt;/dl&gt;
</pre>
<p>&#8230;of course, with more relevant data.<span id="more-110"></span></p>
<h2><span>Improved FAQ</span></h2>
<p>If you have a lot of questions, displaying them all to the user at once isn&#8217;t always such a good idea. If you have many items in your list, you can hide all the answers an only display them when the user clicks on the associated question. The proper way to do this is to hide the <strong>dd</strong>s with Javascript, because if you hide them using CSS and display:none and the user turns off js in the browser, he will only be able to stare with increasing frustration at a list of questions with no visible answers. </p>
<p>Here are two javascript implementations, with two of the most popular javascript frameworks at this moment: <a href="http://www.prototypejs.org/" title="Prototype Javascript framework" class="outgoing">prototype</a> and <a href="http://www.jquery.com" title="jQuery Javascript library" class="outgoing">jQuery</a> that convert a regular definition list into a clickable one in a unobtrusive manner that degrades gracefully.</p>
<p>Prototype implementation (<a href="http://demos.motane.lu/semantic-faqs/semantic-faqs-prototype.html" title="working example with prototype">see working example</a>):</p>
<pre class="brush: jscript; title: ; notranslate">
Event.observe(
    window,
    'load',
    function() {
        $$( '.faq dd' ).each(
            function( item ) {
                item.hide();
            }
        );

        $$( '.faq dt' ).each(
            function( item ) {
                item.observe(
                    'click',
                    function( event ) {
                        Event.element( event ).next().toggle();
                    }
                );
            }
        );
    },
    true
);
</pre>
<p>jQuery implementation (<a href="http://demos.motane.lu/semantic-faqs/semantic-faqs-jquery.html" title="working example with jQuery">see working example</a>):</p>
<pre class="brush: jscript; title: ; notranslate">
$( document ).ready(
    function() {
        $( '.faq dd' ).hide();
        $( '.faq dt' ).toggle(
            function() {
                $( this ).next().show();
            },
            function() {
                $( this ).next().hide();
            }
        );
    }
);
</pre>
<p>Another good idea is to let the user know that the definition terms are &#8220;clickable&#8221;, by adding the following rule to your CSS file: </p>
<pre class="brush: css; title: ; notranslate">
.faq dt {
    cursor: hand;
}
</pre>
<p>Questions? <img src='http://blog.motane.lu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.motane.lu/2009/01/26/semantic-faqs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

