[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Initial whitespace in PI from XSLT, main body
Hi Wendell, Sorry, I totally missed the "house-rule" phrase, as it seemed buried further down the text of your message. Yes, within a company / organisation, they could adopt whatever house rules they choose. As far as these remain closed intin the organisation. Thanks, Dimitre On Mon, May 9, 2022 at 7:57 AM Wendell Piez wapiez@xxxxxxxxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hey Dimitre, > > A bit confused - were you (not) taking me to suggest I thought the rules > should be changed, or that I was proposing Syd adapt to the rules -- and > the (faulty) implementations -- as they currently are? > > My "house style" suggestion is along the lines of adapting to both the > current rules, and the reality that along the edges, not all deployed > tooling works exactly the same. But your critique also seems to be that we > are not (as a community) aggressive enough in changing the rules, whatever > the effects that has in forcing obsolescence? > > Meanwhile, making it explicit that whatever the specs say, you can forgive > a little whitespace munging from your tools ("I don't care about whitespace > so you are free to munge"), seems to me no worse than a rule that says > "whoa don't mess with the whitespace in my PIs, since I might want to > inject code of some nature" (always a great idea). > > Cheers, > Wendell > > On Sun, May 8, 2022 at 2:50 PM Dimitre Novatchev dnovatchev@xxxxxxxxx < > xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > >> > Dimitre, how so? >> >> Wendell, >> >> Do we want the behavior of almost all current XML processing tools to >> suddenly become "incompliant"? >> >> I certainly don't care one way or the other, as I have no code invested >> in using PI's values, but maybe other people's existing tools/suites would >> have to be updated in order to become conformant with the new rules, and >> the user's assets that are relying on these, ..., and some may never do so? >> >> I personally would prefer that the way the various XML-related >> specifications are maintained were not so conservative in regards to >> maintaining backwards compatibility, but this is the reality. Contrast this >> with C# or Java/Scala where it is quite frequent to have some features >> made obsolete and no longer supported. The lucky 31st century C#/Java/Scala >> programmers will not have to comply with obscure and unexplainable "rules" >> that originated thousands of years ago and had no other reasons whatsoever >> to being enforced through eternity except to only preserve "backwards >> compatibility"... >> >> Cheers, >> Dimitre >> >> On Sun, May 8, 2022 at 11:20 AM Wendell Piez wapiez@xxxxxxxxxxxxxxx < >> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: >> >>> Dimitre, how so? >>> >>> Just because current tools preserve whitespace (in PIs) is no reason you >>> can't have a rule that says it should not always be assumed to be >>> persistent, within your data set or processing scope. >>> >>> There are actually places where this kind of thing matters. For example, >>> I would not want to assert such a (house) rule over comments, mainly >>> because if I tolerate comments at all in the data, I had better tolerate >>> line breaks, pseudo-markup and ASCII art, or I am apt to lose much of the >>> information in the comments. (Am I not?) >>> >>> However, having rules about the use and "significance" of whitespace >>> within markup (indeed within differentiated forms of markup) is so normal >>> as to be a perennial FAQ. >>> >>> Cheers, Wendell >>> >>> On Sun, May 8, 2022 at 12:57 PM Dimitre Novatchev dnovatchev@xxxxxxxxx < >>> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: >>> >>>> >>>> > 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. >>>> >>>> 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. >> >> 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.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|