POV-Ray : Newsgroups : povray.off-topic : The trouble with XSLT : Re: The trouble with XML Server Time
29 Jul 2024 20:23:28 EDT (-0400)
  Re: The trouble with XML  
From: Invisible
Date: 2 Mar 2012 04:25:57
Message: <4f509225$1@news.povray.org>
On 02/03/2012 05:54 AM, Darren New wrote:
> On 2/29/2012 1:24, Invisible wrote:
>> The W3C validator disagrees.
>
> Their validator might not be compliant with the standard.

That sounds /highly/ implausible...

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

I'm going to suggest that they changed the standard to be more 
restrictive, or they added a missing check to the validator. It seems 
unlikely that the validator would become /less/ compliant over time. But 
sure, "mess" seems like an accurate way to describe it. :-P

>> 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.

The point is, any XML document that contains text may potentially need 
non-ASCII characters. But only XML documents which are also XHTML can 
contain non-ASCII characters. How is that sensible?

Sure, having more than one DTD doesn't make a lot of sense. (Except that 
it would be nice to apply different DTDs to different namespaces. But 
that has little to do with entities.) The problem is that character 
entities are in the DTD, not defined in the XML spec for /everyone/ to use.

>>> 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.

OK. But it could make sense for different DTDs to apply to different 
subtrees, surely?

>> 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.

Write at XHTML document which contains some MathML. Unless you use the 
magic XHTML+MathML DTD, it doesn't work at all. Clearly it /should/, but 
it doesn't.

>> 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.

In summary, XML doesn't provide the necessary tools to solve common 
problems such as mixing more than one markup together.


Post a reply to this message

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