POV-Ray : Newsgroups : povray.off-topic : The trouble with XSLT Server Time
30 Jul 2024 02:25:55 EDT (-0400)
  The trouble with XSLT (Message 81 to 84 of 84)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Orchid Win7 v1
Subject: Re: The trouble with XML
Date: 10 Mar 2012 04:23:01
Message: <4f5b1d75$1@news.povray.org>
On 10/03/2012 01:08, Francois Labreque wrote:

>>>> <?xml version="1.0" encoding="ISO-8859-1" ?>
>>>
>>> Gaah! No! Use UTF-8! 8859-1 is Western European/United States only!
>>
>> Tell it to [every piece of Windows software that inspects text files].
>> All of these programs seem to default to that encoding, not UTF-8.
>
> Change your local settings to Bulgaria or Czech Republic and it won't!

Won't default to UTF-8? Yes, I know. ;-)


Post a reply to this message

From: Mike Raiford
Subject: Re: The trouble with XML
Date: 19 Mar 2012 12:21:27
Message: <4f675d07$1@news.povray.org>
On 3/9/2012 2:56 PM, Warp wrote:
> Mike Raiford<no.### [at] spamme>  wrote:
>>> <?xml version="1.0" encoding="ISO-8859-1" ?>
>
>> Gaah! No! Use UTF-8! 8859-1 is Western European/United States only! Any
>> characters that are not in this set will be rendered as ? or worse. UTF-8 gives
>> access to the whole of the Unicode codeset, so no data will be mangled by the
>> encoding. Sorry, I'm a big proponent of using a more universal character set,
>> especially when handling data.
>
>    Nothing stops you from using&#xx; codes regardless of the encoding.
>

This is true, but, in general, UTF-8 is the better way to go, but if the 
data displayed on the page comes form a different source...


Post a reply to this message

From: Mike Raiford
Subject: Re: The trouble with XML
Date: 19 Mar 2012 12:23:23
Message: <4f675d7b$1@news.povray.org>
On 3/9/2012 3:38 PM, Orchid Win7 v1 wrote:
>>> <?xml version="1.0" encoding="ISO-8859-1" ?>
>>
>> Gaah! No! Use UTF-8! 8859-1 is Western European/United States only!
>
> Tell it to [every piece of Windows software that inspects text files].
> All of these programs seem to default to that encoding, not UTF-8.

That's because nobody bothers with the encoding. But what drives me nuts 
is when web-authors stick in an encoding, then use UTF-8 characters in 
it. You get all sorts of ugliness.


Post a reply to this message

From: Mike Raiford
Subject: Re: The trouble with XSLT
Date: 19 Mar 2012 12:27:38
Message: <4f675e7a$1@news.povray.org>
On 3/9/2012 3:43 PM, Orchid Win7 v1 wrote:

> What I can't figure out is this: How do I make it process an element one
> way if it contains a "small" amount of content, and process it a
> different way if it contains a "large" amount of content?

Use xsl:choose and have the when statements with the appropriate test? 
I'm unclear as to what constitutes a small amount of content v.s. a 
large amount of content.

You could have it trigger on the string-length of the node's value, for 
instance. Or, you could trigger on the number of nodes (using count)


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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