POV-Ray : Newsgroups : povray.off-topic : The trouble with XSLT : Re: The trouble with XML Server Time
29 Jul 2024 18:27:00 EDT (-0400)
  Re: The trouble with XML  
From: Darren New
Date: 2 Mar 2012 23:37:53
Message: <4f51a021$1@news.povray.org>
On 3/2/2012 1:25, Invisible wrote:
> 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?

No. Only XML documents which are also XHTML documents can use the XHTML 
standard for specifying ASCII-only names for non-ASCII characters.

You *can* put non-ASCII characters in an XML document. That's what the first 
line is for, with the hard-to-remember code numbers, remember? Different 
standards can have different entities. If I want an XML entity that 
represents the symbol for the left eyeball, or an XML entity that represents 
a internal link to the document management system of google, I can do that 
-- just not in XHTML. Look at the triglyphs for C-on-punched-cards. Same 
sort of thing. They're only applicable to C.

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

So type the characters directly. Nothing stops you from embedding a thron or 
an omega in your document except that you don't want to learn how to type 
one on the keyboard you have.

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

You still have to have one DTD that says where the trees are allowed to join 
up. There's nothing that says that DTD isn't trivial to construct from two 
other DTDs.

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

Sure. You have to have the right DTD, because MathML expressions can't 
appear inside URLs, nor can they appear as a child of a <meta> link in the 
header, etc. You have to know the rules of where each can appear in the 
other if you want to actually check it's right.

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

It does. You just don't like the solution. It's like you're saying "Haskell 
doesn't provide the necessary tools to incorporate C syntax into its type 
declarations." No, they're completely different type systems.

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