Re: [xsl] Initial whitespace in PI from XSLT, main body

Subject: Re: [xsl] Initial whitespace in PI from XSLT, main body
From: "Dimitre Novatchev dnovatchev@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 8 May 2022 16:56:45 -0000
> Maybe the solution here is to introduce a new house rule, namely
whitespace in PIs is never semantically significant,
> at least without further specification of the PI or family of PIs, and
hence is fair game for reducing or rewriting.

This will violate the current rules, which eliminate only the leading
whitespace and leave intact any interim or even trailing whitespace.

Cheers,
Dimitre

On Sun, May 8, 2022 at 6:46 AM Wendell Piez wapiez@xxxxxxxxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> Hey Syd and XSL-List,
>
> "The client may not even notice that all of her PIs have lost a leading
> space after her files are 'fixed' ..." indeed!
>
> Maybe the solution here is to introduce a new house rule, namely
> whitespace in PIs is never semantically significant, at least without
> further specification of the PI or family of PIs, and hence is fair game
> for reducing or rewriting.
>
> From this point of view, normalization can be considered a feature not a
> bug. The fact that the rule is not in the data model specs does not mean it
> can't hang on your wall. It might be a good rule to have for other reasons
> too. I am not proposing that everyone adopt it. (Maybe there are
> counter use cases.) But it might be nice for you.
>
> Cheers, Wendell
>
> On Sun, May 8, 2022 at 3:59 AM Bauman, Syd s.bauman@xxxxxxxxxxxxxxxx <
> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
>> Thanks for the thoughts, Dimitre. Could also use some other character
>> (like b  (U+2420) or b$ (U+2424)) and convert it later. But in fact I
have no
>> need to force a whitespace character on output. If I donbt mention it,
the
>> client may not even notice that all of her PIs have lost a leading space
>> after her files are bfixedb with my XSLT. But the spaces are summarily
>> unimportant. (Although it does make me wonder how they got there in the
>> first place. :-)
>>
>> ------------------------------
>> Syd, I see two ways (if you really need to) to maintain a PI whose string
>> value starts with a whitespace character:
>>
>>   1. Enclose this value in some strippable non-whitespace characters (say
>> apostrophes or quotes), or,
>>
>>   2. If the value is guaranteed not to end with a space character, just
>> use the reversed string value, and when you get that in your code, reverse
>> it back.
>>
>> Hope this helps,
>>
>> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
>> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/174322> (by
>> email)
>>
>
>
> --
> ...Wendell Piez... ...wendell -at- nist -dot- gov...
> ...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org...
> ...github.com/wendellpiez... ...gitlab.coko.foundation/wendell...
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/782854> (by
> email <>)
>


--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
To achieve the impossible dream, try going to sleep.
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they write
all patents, too? :)
-------------------------------------
Sanity is madness put to good use.
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.

Current Thread