473,387 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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.

Jul 20 '05 #1
5 2324
In article <bo**********@mail.cn99.com>, one of infinite monkeys
at the keyboard of Zhang Weiwu <we********@hotmail.com> wrote:
Hello. I just read a article "rdf in html: approaches" at
"http://infomesh.net/2002/rdfinhtml" (guided by google).
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.
Looking into the "Embed XML RDF Part II: Embrace Validation" part, there
are an example DTD and xhtml page.
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.
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.
Do read Sean's Conclusions section carefully!
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.
That's nothing to do with RDF. Read the FAQ.
Any suggestions to make it validate? Thank you.


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
Jul 20 '05 #2
In article <bo**********@mail.cn99.com>,
Zhang Weiwu <we********@hotmail.com> wrote:
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.
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?
In fact I copied the example
xhtml file into my website, it won't pass validation.
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.
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.
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.
Any suggestions to make it validate?


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
hs******@iki.fi
http://iki.fi/hsivonen/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Jul 20 '05 #3
On Mon, 03 Nov 2003 08:43:05 +0200, Henri Sivonen <hs******@iki.fi>
wrote:
Why do you want to make it validate? RDF doesn't belong in XHTML 1.1 or
XHTML 1.0.


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/

Jul 20 '05 #4
The W3C provides an RDF Validation service .....

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

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

James Pickering
http://www.jp29.org/
Jul 20 '05 #5
In article <3f**************@news.cis.dfn.de>,
ji*@jibbering.com (Jim Ley) wrote:
If RDF doesn't belong in XHTML 1.1, what's the point of XHTML 1.1 ?


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
hs******@iki.fi
http://iki.fi/hsivonen/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: xmp333 | last post by:
Hi, I'm trying to create a page where clicking on a link will go to a php page and pass it parameters so it can determine which link was clicked. I don't want to use any client side scripting...
5
by: MAK | last post by:
I'm stumped. I'm trying to use Python 2.3's urllib2.urlopen() to open an HTML file on the local harddrive of my WinXP box. If I were to use, say, Netscape to open this file, I'd specify it as...
12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
6
by: Els | last post by:
If I use <? include "file.html"; ?> in the html of my document, do I _have_ to change the extension of that document to .php, or would it still work and be valid if I let it remain .html? --...
81
by: sinister | last post by:
I wanted to spiff up my overly spartan homepage, and started using some CSS templates I found on a couple of weblogs. It looks fine in my browser (IE 6.0), but it doesn't print right. I tested...
2
by: Harlin Seritt | last post by:
I have a file that a few different running scripts will need to access. Most likely this won't be a problem but if it is, what do I need to do to make sure scripts don't crash because the input...
3
by: Kenneth McDonald | last post by:
Over the last couple of years, I've built a module called rex that lays on top of (and from the user's point of view, hides) the re module. rex offers the following advantages over re. *...
2
by: Number 11950 - GPEMC! Replace number with 11950 | last post by:
HTML to RTF conversion is done by the clipboard in certain circumstances. Does anyone know of an API or possibly a Framework2 class.method that will convert HTML to RTF...? TIA -- Timothy...
68
by: zwsdotcom | last post by:
I've been looking for references for some weeks now, but haven't found an answer to the following question. I'd love some help on this: *Without* using JavaScript or other active client-side...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.