POV-Ray : Newsgroups : povray.off-topic : The trouble with XSLT : Re: The trouble with XML Server Time
29 Jul 2024 20:21:56 EDT (-0400)
  Re: The trouble with XML  
From: Darren New
Date: 2 Mar 2012 00:54:30
Message: <4f506096$1@news.povray.org>
On 2/29/2012 1:24, Invisible wrote:
> The W3C validator disagrees.

Their validator might not be compliant with the standard.

> (For example, my personal web pages do not have this third declaration. When
> I wrote them, the validator accepted them. Today, it rejects them because of
> the missing third declaration. Gotta love how a set of standards compliant
> pages are no longer compliant with the same standard, even though the pages
> haven't changed...)

See? Either it wasn't before, or it isn't now. Hard to say without actually 
delving deep into the mess.

>> There is. That's what the <!DOCTYPE> tag you complain about is doing.
>> It's linking to the entities for xhtml. See that ".dtd" on the end of
>> the URL?
>
> It's linking the entire definition of the XHTML language, not just the
> character entities.

Right. Well, what do you expect?

> As far as I know, there is no way of using XHTML entities without also
> declaring that this is an XHTML document.

Right. Because that would be meaningless.

> If just the entity definitions
> were in a separate DTD, you could maybe do it. (But even then, I have a
> sinking feeling you can only have one DTD per document, so you'd still be
> stuffed.)

Correct and correct, and it makes perfect sense why this is so.

>> http://www.rpbourret.com/xml/NamespacesFAQ.htm#valid_2
>
> I'm not sure what this is trying to say.

It's explaining why it doesn't make sense to ask to have more than one DTD 
for a document. An XML document forms a tree. A DTD describes which types of 
nodes can be descendants of other types of nodes. It wouldn't make sense to 
have two of those declarations for one tree.

It's like complaining in Haskell that if you want to use either an integer 
or a string in a variable, you have to declare a type that supports a choice 
between *both*, instead of just mixing them together.

If you don't check structure with a DTD, you can mix and match whatever you 
want. But a DTD is the "strong typing" for XML (and SGML), and it doesn't 
make sense to say "here's a set of two independant declarations of types."

> I know that you /can/ stuff more than one namespace into an XML document.
> It's just that it doesn't /work/ when you try to use it.

It ... works for me. You just have to (a) do it right and (b) have a tool 
that supports it.

> Isn't that the purpose of the HTML <object> tag though? So it can contain an
> arbitrary object? If you just state that <object> is the only place where
> elements from another namespace can go, the problem is solved.

1) Can HTML appear inside the <object> tag? If so, can your other namespace 
also appear inside the <object> tag inside the <html> tag inside the 
<object> tag?  Etc.

2) Sure, for HTML. Solve that in a general way. What if you want only some 
tags to appear in the <head> and only other tags appear in the <body>? No, 
there's no notation in a DTD that says "by the way, don't check the validity 
of anything inside this particular type of tag." Other than CDATA maybe.

-- 
Darren New, San Diego CA, USA (PST)
   People tell me I am the counter-example.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.