Blog
2008 posts (36)
Pages:
< Previous 1–10 11–20 21–30 31–40 Next >
Ordering:
Ascending Descending
31. XHTML 2 vs. HTML 5
2008-01-28 12:11:50 by Martynas Jusevičius
W3C has published the first working draft of HTML 5. In it, new features are introduced to help Web application authors, new elements are introduced based on research into prevailing authoring practices, and special attention has been given to defining clear conformance criteria for user agents in an effort to improve interoperability
. However, at the same time there is ongoing work on XHTML 2.
How do these specifications relate to each other? HTML 5 claims that XHTML 2 only fits the document-oriented paradigm, but there is a need to extend the HTML vocabulary to support non-document content such as forum sites and online shops. They come in different namespaces, so there should be no conflict in that.
XHTML 2 should further increase semantics and separation between content and presentation, move to a modular approach in combination with XForms, and base on XML. HTML 5 on the other hand tries to incorporate features used in practice.
XHTML 2 seems to be pushed by the W3C, while HTML 5 is backed by vendors such as Mozilla and Opera, which started the work on it in WHATWG but eventually joined W3C's HTML working group.
To make things even more confusing, HTML 5 draft proposes 2 authoring formats: one based on XML (called XHTML 5), and one based on a custom format inspired by SGML (called HTML 5). Vendors are encouraged to implement both.
So far the future of the relationship seems very unclear, as both HTML 5 and XHTML 2 seem to compete in trying to replace HTML 4 and XHTML 1. It would be hard to imagine future versions of HTML not based on XML. Anyway, if this is about to become a standards war, which is the very least thing needed on the Web today, the real losers will be users and developers.
More insights in X/HTML 5 Versus XHTML 2 by XHTML.com and HTML V5 and XHTML V2 by IBM developerWorks.
32. Why PHP rocks
2008-01-24 16:17:22 by Martynas Jusevičius
OdinJobs published an interview with some PHP folks on why they think PHP rocks. I was glad to contribute a little :)
33. SPARQL became W3C recommendation
2008-01-24 16:14:06 by Martynas Jusevičius
For those who missed it, SPARQL Query Language for RDF became a W3C recommendation on January 15th.
34. DBpedia: A Nucleus for a Web of Open Data
2008-01-17 12:26:09 by Martynas Jusevičius
DBpedia is a community effort to extract structured information from Wikipedia and to make this information available on the Web
. It is a fine example of the next generation semantic applications and can be compared by functionality to Freebase which also uses Wikipedia's dataset. The difference is that DBpedia's data and framework are open-source, and it is built using W3C standards such as RDF/OWL and SPARQL.
DBpedia makes it possible to ask sophisticated queries, such as as to select “people influenced by Friedrich Nietzsche” or “German musicians who were born in Berlin”. The second query looks like this in SPARQL (prefixes omitted):
SELECT ?name ?birth ?description ?person WHERE {
?person dbpedia2:birthPlace <http://dbpedia.org/resource/Berlin> .
?person skos:subject <http://dbpedia.org/resource/Category:German_musicians> .
?person dbpedia2:birth ?birth .
?person foaf:name ?name .
?person rdfs:comment ?description .
FILTER (LANG(?description) = 'en') .
}
ORDER BY ?nameIt can be executed using one of the several SPARQL endpoints (see results here).
The datasets, now containing 103 million triples that describe 1.95 million things, are published online as linked data and can be browsed using semantic browsers such as Tabulator. They are also available for download.
What is even more exciting, DBpedia is also being linked to different other semantic datasets such as MusicBrainz (information about music and artists) and GeoNames (information about geographical features), becoming the core of W3C's Linking Open Data project.
35. DIY tips: Building query string with XSLT
2008-01-08 22:17:25 by Martynas Jusevičius
If you're using XSLT to build web pages, you should have come across situations where you need to build a query string from parameter or node values to make a (X)HTML anchor link. Sounds trivial enough, but more logic gets involved if one or more parameters are optional — you have at least to take care of trailing apostrophes. Since that involves <xsl:if> or other control elements, the logic does not fit nicely within the attribute value template { }, which is a very handy XSLT construct (basically a shorthand of <xsl:value-of> for use in attributes).
The solution we use, is to have a separate named template for building the query string. You pass the values you need to appear in the query string as template parameters, and get the whole string back:
<xsl:template name="query-string">
<xsl:param name="lang-param"/>
<xsl:param name="view-param"/>
<xsl:param name="offset-param"/>
<xsl:param name="limit-param"/>
<xsl:param name="order-by-param"/>
<xsl:variable name="temp-qs">
<xsl:if test="$lang-param != $default-lang">lang=<xsl:value-of select="$lang-param"/>&</xsl:if>
<xsl:if test="$view-param">view=<xsl:value-of select="$view-param"/>&</xsl:if>
<xsl:if test="$offset-param">offset=<xsl:value-of select="$offset-param"/>&</xsl:if>
<xsl:if test="$limit-param">limit=<xsl:value-of select="$limit-param"/>&</xsl:if>
<xsl:if test="$order-by-param">order-by=<xsl:value-of select="$order-by-param"/>&</xsl:if>
</xsl:variable>
<xsl:if test="string-length($temp-qs) > 1">?<xsl:value-of select="substring($temp-qs, 1, string-length($temp-qs) - 1)"/></xsl:if>
</xsl:template>You can assign the query string to a variable before constructing the link, and still use the attribute value template:
<xsl:variable name="query-string">
<xsl:call-template name="query-string">
<xsl:with-param name="lang-param" select="$lang"/>
<xsl:with-param name="view-param" select="'all'"/>
<xsl:with-param name="order-by-param" select="'Event.CreationDateTime'"/>
</xsl:call-template>
</xsl:variable>
<a href="{$resource/*/@uri}{$query-string}">Recently added</a>Another possibility is to pass the query parameters and values in a single nodeset instead of several template parameters.
36. IE8 to pass Acid2 test
2008-01-06 13:27:49 by Martynas Jusevičius
Might be old news, but still it's nice to see that Microsoft is working on the Internet Explorer browser and has announced in its development blog that IE8 passes the Acid2 test. A first public beta is planned in the first half of 2008.
Acid2 is a test page, written to help browser vendors ensure proper support for web standards in their products
. So far Safari, Opera, and Konqueror (as well as some other browsers based on their platforms) are listed as compliant with the test.
Pages:
< Previous 1–10 11–20 21–30 31–40 Next >
Ordering:
Ascending Descending
