Hello Fabien. I was working on a general purpose RDFa -> RDF/XML
modality for an Atom feed over the weekend and used this transformation
stylesheet (or the one in the GRDDL WG repository:
grddl-wg/td/RDFa2RDFXML_v_0_7.xsl). I had to make some changes to get it
to work and thought you might be interested. I didn't commit the
changes, below is a diff:
RCS file: /w3ccvs/WWW/2001/sw/grddl-wg/td/RDFa2RDFXML_v_0_7.xsl,v
retrieving revision 1.1
diff -u -b -r1.1 RDFa2RDFXML_v_0_7.xsl
--- RDFa2RDFXML_v_0_7.xsl 20 Apr 2007 12:39:52 -0000 1.1
+++ RDFa2RDFXML_v_0_7.xsl 23 Apr 2007 16:47:04 -0000
@@ -15,7 +15,7 @@
<variable name='base' select="//*/@xml:base[position()=1]"/>
<!-- url of the current XHTML page if provided by the XSLT engine -->
-<param name='url' select=""/>
+<param name='url' select="''"/>
<!-- this contains the URL of the source document weither it was
provided by the base or as a parameter e.g.
http://example.org/bla/file.html-->
<variable name='this' >
@@ -191,7 +191,7 @@
<value-of
select="normalize-space(substring-before($string,' '))"/>
<call-template
name="tokenize"><with-param name="string"
select="normalize-space(substring-after($string,'
'))"/></call-template>
</when>
- <otherwise><text><value-of
select="$string"/></text></otherwise>
+ <otherwise><value-of
select="$string"/></otherwise>
</choose>
</if>
</template>
In particular: 1) The default value for the $url is an empty string.
The way it was before, it was not a valid XPath expression and 2)
<xsl:value-of/> cannot be used within <xsl:text>
(
http://www.w3.org/TR/xslt#section-Creating-Text)
I also wondered if the lack of support for blank node CURIES (i.e.,
[_:a]) was because this is an 'unstable' feature in RDFa?
Otherwise, the transform worked wonderfully!
On Sun, 2007-04-15 at 19:53 +0200, Fabien Gandon wrote:
>
Question #2: What happened to the use of "class" attribute?
>
Since I found no trace of it in the tests and in the syntax, I
>
deactivated its use in the transformation.
Yes, I was going to ask about this as well, but I notice there is an
ongoing discussion about it in public-rdf-in-xhtml-tf@xxxxxx :)
--
Chimezie Ogbuji
Lead Systems Analyst
Thoracic and Cardiovascular Surgery
Cleveland Clinic Foundation
9500 Euclid Avenue/ W26
Cleveland, Ohio 44195
Office: (216)444-8593
ogbujic@xxxxxxx
Cleveland Clinic is ranked one of the top 3 hospitals in
America by U.S.News & World Report. Visit us online at
http://www.clevelandclinic.org for a complete listing of
our services, staff and locations.
Confidentiality Note: This message is intended for use
only by the individual or entity to which it is addressed
and may contain information that is privileged,
confidential, and exempt from disclosure under applicable
law. If the reader of this message is not the intended
recipient or the employee or agent responsible for
delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If
you have received this communication in error, please
contact the sender immediately and destroy the material in
its entirety, whether electronic or hard copy. Thank you.
===================================
Thread at a glance:
Previous Message by Date:
click to view message preview
W3C Validator and namespaces
Dear TF,
Following the question about validation on this telecon [1] I've
searched under the W3C archive to gain an answer. So on an old message
by Masayasu Ishikawa [2]:
[[
DTD-based validation and namespaces are not really compatible.
If you really want to perform DTD-based validation, whatever
namespaces you want to add, you have to declare necessary
elements and attributes appropriately in the internal or
external DTD subset, including the xmlns attribute.
If your REALLY have to do so, you might want to look at
"Modularization of XHTML", at:
http://www.w3.org/TR/xhtml-modularization/
Otherwise, you'd better consider schema-based validation or
live with "well-formed but not valid" for now.
]]
Can we contact validator-team if there are news about this? And if
problem is fixed? So we may also consider the test [2] version of
validator [3]. These links and for validation of one our TC.
Regards and have a fine day,
Simone
[1] http://lists.w3.org/Archives/Public/www-validator/2002Jan/0088.html
[2]
http://validator-test.w3.org/check?uri=http%3A%2F%2Fwww.w3.org%2F2006%2F07%2FSWD%2FRDFa%2Ftestsuite%2Fxhtml1-testcases%2F0001
[3]
http://validator.w3.org/check?uri=http://www.w3.org/2006/07/SWD/RDFa/testsuite/xhtml1-testcases/0001
[3] http://validator-tet
Next Message by Date:
click to view message preview
File suffix and media type of XHTML 1.1 test cases
Dear TF,
Regarding media types [1] there a a document explain this:
[[
The 'application/xhtml+xml' media type [RFC3236]
is the media type for XHTML Family document types, and
in particular it is suitable for XHTML Host Language document types.
XHTML Family document types suitable for this media type include
[XHTML1],
[XHTMLBasic],
[XHTML11] and
[XHTML+MathML].
An XHTML Host Language document type that adds elements and
attributes from foreign namespaces MAY identify
its profile with the 'profile' optional parameter or other means such as
the "Content-features" MIME header described in RFC 2912
[RFC2912].
Each namespace SHOULD be explicitly identified through
namespace declaration [XMLNS]. This document
does not preclude the registration of its own media type for specific
XHTML Host Language document type.
]]
Of course for MIME [1]
[[
application/xhtml+xml' SHOULD be used for serving
XHTML documents to XHTML user agents. Authors who wish to support
both XHTML and HTML user agents MAY utilize content
negotiation by serving HTML documents as 'text/html' and XHTML documents
as 'application/xhtml+xml'. Also note that it is not necessary
for XHTML documents served as 'application/xhtml+xml' to follow
the HTML Compatibility Guidelines.
]]
Regarding suffix anyone have informations for (default) support of
.xhtml on Apache, IIS, browsers? Otherwise Web Authors may use to send
correct content-type:
- Server Side Languages (PHP, PY and more...)
- .htaccess on Apache
- Settings on IIS (but actually web hosts cannot permit to change
these settings)
- @http-quiv
Regards,
Simone
[1] http://www.w3.org/TR/xhtml-media-types/#summary
Previous Message by Thread:
click to view message preview
Re: XMLLiteral (was: GRDDL RDFa transformation tests results)
Fabien,
Yes, you are absolutely right...we definitely need _some_ namespaces,
although in this situation only the XHTML namespace would be
absolutely required (the default namespace in your example).
Regards,
Mark
On 17/04/07, Fabien Gandon <Fabien.Gandon@xxxxxxxxxxxxxxx> wrote:
Hausenblas, Michael :
> Regarding the XMLLiteral issue (TC 13):
> Did you have a look at [1], already? If yes, feel free to add an
> according question (best with source code :) there, if not, pls have a look at
> this Wiki page, and tell us if it answers your question or what is still
> missing.
>
>> Test case#13: I fail this test but I need explanations.
>> http://www.w3.org/2006/07/SWD/RDFa/testsuite/testcases/000013.html
>> http://www.w3.org/2006/07/SWD/RDFa/testsuite/testcases/000013.sparql
>> Here I don't really know what to produce: the reason I fail is
>> because when I copy the source nodes:
>> E = mc<sup>2</sup>: The Most Urgent Problem of Our Time
>> The transformation adds the namespaces declaration to <sup>.
>> I am not clear exactly what should be copied: (1) the exact
>> string or (2) the XML nodes and their context?
>> I looked at the following pointer but couldn't tell after either:
>> http://www.w3.org/TR/2003/WD-rdf-concepts-20030123/#dfn-rdf-XMLLiteral
>>
Michael,
Thanks for the pointer but to illustrate my problem here is a sample of
the output I produce for this case:
<rdf:Description
rdf:about="http://www.w3.org/2006/07/SWD/RDFa/testsuite/testcases/000013.html">
<dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"
rdf:datatype="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral">
E = mc<sup xmlns="http://www.w3.org/1999/xhtml"
xmlns:cc="http://web.resource.org/cc/" xmlns:ex="http://example.org/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:xh11="http://www.w3.org/1999/xhtml"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2</sup>: The Most
Urgent Problem of Our Time
</dc:title>
As you can see the copy of the node content is done in an XML manner
i.e. the <sup> element is copied with all the namespaces of its context.
While the copy showed in the test is a plain text copy:
<http://www.w3.org/2006/07/SWD/RDFa/testsuite/testcases/000013.html>
<http://purl.org/dc/elements/1.1/title>
"E = mc<sup>2</sup>: The Most Urgent Problem of Our
Time"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral>
So my question was: do we really want a plaintext copy or do we want an
XML copy?
Cheers,
--
Fabien - http://www.inria.fr/acacia/fabien/
--
Mark Birbeck, formsPlayer
mark.birbeck@xxxxxxxxxx | +44 (0) 20 7689 9232
http://www.formsPlayer.com | http://internet-apps.blogspot.com
standards. innovation.
Next Message by Thread:
click to view message preview
Re: GRDDL RDFa transformation tests results
Chimezie Ogbuji:
Hello Fabien. I was working on a general purpose RDFa -> RDF/XML
modality for an Atom feed over the weekend and used this transformation
stylesheet (or the one in the GRDDL WG repository:
grddl-wg/td/RDFa2RDFXML_v_0_7.xsl). I had to make some changes to get it
to work and thought you might be interested. I didn't commit the
changes, below is a diff:
Thanks, please do commit them (I can't) ; I changed the online version
here:
http://www-sop.inria.fr/acacia/soft/RDFa2RDFXML_v_0_7.xsl
I also wondered if the lack of support for blank node CURIES (i.e.,
[_:a]) was because this is an 'unstable' feature in RDFa?
Well no... this really is due to a lack of time: there is a stable
section explaining this aspect of the syntax in the specs but to
implement it properly I need to rewrite some of the core templates of
the transformation to be able to switch from "rdf:about" or
"rdf:resource" to "rdf:nodeID" when I generate triples attached to
blank nodes. The current transforms gives generated rdf:IDs to blank
nodes and this is a bad hack I should remove as soon as I have the time
to do it ; then I will be able to address blank node CURIES properly.
Question #2: What happened to the use of "class" attribute?
Since I found no trace of it in the tests and in the syntax, I
deactivated its use in the transformation.
Yes, I was going to ask about this as well, but I notice there is an
ongoing discussion about it in public-rdf-in-xhtml-tf@xxxxxx :)
Yes and as of today there is nothing about this in the RDFa syntax
specs that's while I removed the templates I had for it.
Cheers,
--
Fabien - http://www.inria.fr/acacia/fabien/