Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 05:28 PM
Zhang Weiwu
Guest
 
Posts: n/a
Default putting rdf in html won't pass vaildation?

Hello. I just read a article "rdf in html: approaches" at
"http://infomesh.net/2002/rdfinhtml" (guided by google).

Looking into the "Embed XML RDF Part II: Embrace Validation" part, there
are an example DTD and xhtml page. I don't know much about xhtml
Modularization, but I think this example should be workable in
cut-and-paste fashion for newcomers to use. In fact I copied the example
xhtml file into my website, it won't pass validation. Here is the error
message:

I was not able to extract a character encoding labeling from any of the
valid sources for such information. Without encoding information it is
impossible to validate the document.

And if I add this line of character encoding info (which I often use)
before the example xhtml page:
<?xml version="1.0" encoding="utf-8"?>
I still get error messages at
http://validator.w3.org/check?uri=ht...et%2Ftest.html
which looks like this:

# /Line 9
<http://validator.w3.org/check?uri=http%3A%2F%2Faliweekly.nease.net%2Ftest. html#line-9>,
column 8/: document type does not allow element "RDF

|<rdf:RDF>|
^

# /Line 10
<http://validator.w3.org/check?uri=http%3A%2F%2Faliweekly.nease.net%2Ftest. html#line-10>,
column 24/: there is no attribute "RDF

|<rdf:Property rdf:about="http://purl.org/net/swn#homepage">|

[snip]

Any suggestions to make it validate? Thank you.

  #2  
Old July 20th, 2005, 05:28 PM
Nick Kew
Guest
 
Posts: n/a
Default Re: putting rdf in html won't pass vaildation?

In article <bo4dvp$hbm$3@mail.cn99.com>, one of infinite monkeys
at the keyboard of Zhang Weiwu <weiwuzhang@hotmail.com> wrote:[color=blue]
> Hello. I just read a article "rdf in html: approaches" at
> "http://infomesh.net/2002/rdfinhtml" (guided by google).[/color]

Ah, that's a new one to me. I thought Sean's basic answer to that
question was "don't", but you've found a longer one.
[color=blue]
> Looking into the "Embed XML RDF Part II: Embrace Validation" part, there
> are an example DTD and xhtml page.[/color]

The difficulty with that approach is you cannot define a generic DTD
for RDF. You have to look at the structure of the particular RDF
you're using and define a module around it.

I played with rdf-in-html about two or three years ago, but nowadays
the only approach I use is <link> to the Metadata.
[color=blue]
> I don't know much about xhtml
> Modularization, but I think this example should be workable in
> cut-and-paste fashion for newcomers to use.[/color]

Do read Sean's Conclusions section carefully!
[color=blue]
> I was not able to extract a character encoding labeling from any of the
> valid sources for such information. Without encoding information it is
> impossible to validate the document.[/color]

That's nothing to do with RDF. Read the FAQ.
[color=blue]
> Any suggestions to make it validate? Thank you.[/color]

I'd recommend <link ...>

One point he misses is the different content model for <script> in
HTML (CDATA) and XHTML (#PCDATA) - meaning that it "works" in HTML
but not XHTML. Not that I'd recommend it either way.
See <http://ilrt.org/discovery/chatlogs/rdfig/2003-11-03.html#T04-59-34>


--
Nick Kew

In urgent need of paying work - see http://www.webthing.com/~nick/cv.html
  #3  
Old July 20th, 2005, 05:28 PM
Henri Sivonen
Guest
 
Posts: n/a
Default Re: putting rdf in html won't pass vaildation?

In article <bo4dvp$hbm$3@mail.cn99.com>,
Zhang Weiwu <weiwuzhang@hotmail.com> wrote:
[color=blue]
> Looking into the "Embed XML RDF Part II: Embrace Validation" part, there
> are an example DTD and xhtml page. I don't know much about xhtml
> Modularization, but I think this example should be workable in
> cut-and-paste fashion for newcomers to use.[/color]

If you don't use one of the XHTML 1.0 DTDs, your XHTML Family document
should be served as application/xhtml+xml, not as text/html.

Why are you putting RDF in XHTML? What are you trying to achieve?
[color=blue]
> In fact I copied the example
> xhtml file into my website, it won't pass validation.[/color]

You test file isn't even a well-formed XML document, so it cannot be
valid XML.

Also, http://infomesh.net/2002/m12n/test/rdf.txt is delivered as
text/plain.
[color=blue]
> I was not able to extract a character encoding labeling from any of the
> valid sources for such information. Without encoding information it is
> impossible to validate the document.[/color]

You don't advertise the character encoding in the Content-Type HTTP
header and you are using a text/* type instead of an application/* type.
[color=blue]
> Any suggestions to make it validate?[/color]

Why do you want to make it validate? RDF doesn't belong in XHTML 1.1 or
XHTML 1.0. What's the benefit of getting a document to validate, if in
order to validate, you have to make the DTD conform to the document and
not vice versa?

--
Henri Sivonen
hsivonen@iki.fi
http://iki.fi/hsivonen/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
  #4  
Old July 20th, 2005, 05:28 PM
Jim Ley
Guest
 
Posts: n/a
Default Re: putting rdf in html won't pass vaildation?

On Mon, 03 Nov 2003 08:43:05 +0200, Henri Sivonen <hsivonen@iki.fi>
wrote:
[color=blue]
>Why do you want to make it validate? RDF doesn't belong in XHTML 1.1 or
>XHTML 1.0.[/color]

If RDF doesn't belong in XHTML 1.1, what's the point of XHTML 1.1 ?

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

  #5  
Old July 20th, 2005, 05:28 PM
James Pickering
Guest
 
Posts: n/a
Default Re: putting rdf in html won't pass vaildation?

The W3C provides an RDF Validation service .....

http://www.w3.org/RDF/Validator/

...... for external/linked RDF documents.

James Pickering
http://www.jp29.org/
  #6  
Old July 20th, 2005, 05:29 PM
Henri Sivonen
Guest
 
Posts: n/a
Default Re: putting rdf in html won't pass vaildation?

In article <3fa66b92.3323789@news.cis.dfn.de>,
jim@jibbering.com (Jim Ley) wrote:
[color=blue]
> If RDF doesn't belong in XHTML 1.1, what's the point of XHTML 1.1 ?[/color]

If SVG doesn't belong in XHTML 1.1, what's the point of XHTML 1.1 ?
If MathML doesn't belong in XHTML 1.1, what's the point of XHTML 1.1 ?

I guess the point of XHTML 1.1 is to provide an example that demostrates
how XHTML DTD modules can be combined and a reference point for
constructing extended DTDs. Such extended DTDs are not equal to the
XHTML 1.1 DTD, though, and documents authored according to such an
extended DTD are not strictly conforming XHTML 1.1 documents.

I think there's little (if any) value in extending the XHTML 1.1 DTD in
order to please the W3C validator. There might be some value in using a
custom DTD internally in server-side system in order to catch bad
output--that is, in order to discover bugs in the software generating
the output. However, considering the issues with namespaces and DTDs, a
Relax NG schema might be better suited for such purpose.

--
Henri Sivonen
hsivonen@iki.fi
http://iki.fi/hsivonen/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles