The ref tag parameter follow in non wikisource wikis

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

The ref tag parameter follow in non wikisource wikis

יגאל חיטרון
Hello.
Could you explain me, please, why the <ref> tag parameter follow= is not
turned off in wiki sites that are not wikisource? Who needs it there at all?
Thank you,
Igal (User:IKhitron)
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: The ref tag parameter follow in non wikisource wikis

Wiki Billinghurst
Presumably because it is part of Extension:Cite, not part of
Extension:Proofread; and the two extensions operate individually, and
Cite is independent of any particular wiki.

-- billinghurst

------ Original Message ------
From: "יגאל חיטרון" <[hidden email]>
To: "Wikimedia developers" <[hidden email]>
Sent: 13/12/2018 5:03:16 AM
Subject: [Wikitech-l] The ref tag parameter follow in non wikisource
wikis

>Hello.
>Could you explain me, please, why the <ref> tag parameter follow= is
>not
>turned off in wiki sites that are not wikisource? Who needs it there at
>all?
>Thank you,
>Igal (User:IKhitron)
>


_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: The ref tag parameter follow in non wikisource wikis

Thiemo Kreuz
In reply to this post by יגאל חיטרון
> […] why the <ref> tag parameter follow= is not turned off in wiki sites that are not wikisource?

As the Technical Wishes team at Wikimedia Germany is currently working
on the Cite extension, I had a look to find an answer to your
question.

The follow="…" feature was introduced in 2010[1] as part of the Cite
extension, the extension responsible for the <ref> and <references>
tags. The feature was never designed to be turned on or off per wiki,
and can't be turned off.

In case a wiki does not want to use it, and make sure it isn't used, I
suggest to either use an "insource" search[2] on a regular basis, or
possibly talk to the users running the Check Wikipedia project[3] to
add a scan for the follow="…" parameter to their list.

Best
Thiemo

[1] https://phabricator.wikimedia.org/rECITb5883ddc36f8ee270f555ad73ac5fa00cf1bcbc9
[2] https://www.mediawiki.org/wiki/Help:CirrusSearch#Insource
[3] https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Check_Wikipedia

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: The ref tag parameter follow in non wikisource wikis

יגאל חיטרון
Thank you.
But even so, what about the weird order of precedence? I really do not like
that this code actually works:
text1<ref name=abc>{{cite</ref>text3<ref follow=abc>|title=google|url=
http://google.com}}</ref>text5
Or it's implemented like this in purpose?
Igal


‫בתאריך יום ה׳, 13 בדצמ׳ 2018 ב-12:58 מאת ‪Thiemo Kreuz‬‏ <‪
[hidden email]‬‏>:‬

> > […] why the <ref> tag parameter follow= is not turned off in wiki sites
> that are not wikisource?
>
> As the Technical Wishes team at Wikimedia Germany is currently working
> on the Cite extension, I had a look to find an answer to your
> question.
>
> The follow="…" feature was introduced in 2010[1] as part of the Cite
> extension, the extension responsible for the <ref> and <references>
> tags. The feature was never designed to be turned on or off per wiki,
> and can't be turned off.
>
> In case a wiki does not want to use it, and make sure it isn't used, I
> suggest to either use an "insource" search[2] on a regular basis, or
> possibly talk to the users running the Check Wikipedia project[3] to
> add a scan for the follow="…" parameter to their list.
>
> Best
> Thiemo
>
> [1]
> https://phabricator.wikimedia.org/rECITb5883ddc36f8ee270f555ad73ac5fa00cf1bcbc9
> [2] https://www.mediawiki.org/wiki/Help:CirrusSearch#Insource
> [3] https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Check_Wikipedia
>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: The ref tag parameter follow in non wikisource wikis

Thiemo Kreuz
The wikitext snippet you posted appears to be seriously broken. More
precisely: It is unbalanced. Technically, there is no such thing as
"broken" wikitext. The parser will always output something (as he does
in the example). However, this doesn't mean such wikitext is ok. Sure,
nobody is stopping anyone from writing unbalanced code. But it becomes
unpredictable (as the example shows), unreliable, and effectively
unmaintainable as it starts to heavily depend on quirky internal
details of the parsers implementation, how it approaches certain
aspects, and in which order they are processed.

The bigger problem here is this: Even if you figure out how the parser
works right now, it might change, as it already did many times. Have a
look at pages like https://www.mediawiki.org/wiki/Markup_spec to get
an idea of how complex this topic is, and how many people tried how
many times to nail it down, all failing for one or the other reason.
Code like the one you showed depends so much on the tiniest
implementation detail of the parsing process, it becomes so fragile
that it might break any day for reasons nobody could ever anticipate
without a warning.

Please balance your wikitext.

Best
Thiemo

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: The ref tag parameter follow in non wikisource wikis

יגאל חיטרון
The problem is the precedence, once again. I expect from the parser to
parse wiki markup before parsing html tags, because templates can create
new tags by transclusion. If the ref tag is parsed first, glueing the
unbalanced parts to one proper template call, that means that (1) the
template can't include ref tags with follow parameter, because they will
not be parsed any more; or (2) after the transclusion the tags are parsed
once again, with the same algorithm. Both variants look me as a bad choice.
So the fact that the bad code I posted works is a symptom for a parser
problem.
Igal


‫בתאריך יום ה׳, 13 בדצמ׳ 2018 ב-18:17 מאת ‪Thiemo Kreuz‬‏ <‪
[hidden email]‬‏>:‬

> The wikitext snippet you posted appears to be seriously broken. More
> precisely: It is unbalanced. Technically, there is no such thing as
> "broken" wikitext. The parser will always output something (as he does
> in the example). However, this doesn't mean such wikitext is ok. Sure,
> nobody is stopping anyone from writing unbalanced code. But it becomes
> unpredictable (as the example shows), unreliable, and effectively
> unmaintainable as it starts to heavily depend on quirky internal
> details of the parsers implementation, how it approaches certain
> aspects, and in which order they are processed.
>
> The bigger problem here is this: Even if you figure out how the parser
> works right now, it might change, as it already did many times. Have a
> look at pages like https://www.mediawiki.org/wiki/Markup_spec to get
> an idea of how complex this topic is, and how many people tried how
> many times to nail it down, all failing for one or the other reason.
> Code like the one you showed depends so much on the tiniest
> implementation detail of the parsing process, it becomes so fragile
> that it might break any day for reasons nobody could ever anticipate
> without a warning.
>
> Please balance your wikitext.
>
> Best
> Thiemo
>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: The ref tag parameter follow in non wikisource wikis

יגאל חיטרון
N3: The lonk you provides expects the transclusion (preprocessor 3.4)
before tags (processor 2.2). So the follow parameter behavior is broken.
Igal


‫בתאריך יום ה׳, 13 בדצמ׳ 2018 ב-18:25 מאת יגאל חיטרון <‪
[hidden email]‬‏>:‬

> The problem is the precedence, once again. I expect from the parser to
> parse wiki markup before parsing html tags, because templates can create
> new tags by transclusion. If the ref tag is parsed first, glueing the
> unbalanced parts to one proper template call, that means that (1) the
> template can't include ref tags with follow parameter, because they will
> not be parsed any more; or (2) after the transclusion the tags are parsed
> once again, with the same algorithm. Both variants look me as a bad choice.
> So the fact that the bad code I posted works is a symptom for a parser
> problem.
> Igal
>
>
> ‫בתאריך יום ה׳, 13 בדצמ׳ 2018 ב-18:17 מאת ‪Thiemo Kreuz‬‏ <‪
> [hidden email]‬‏>:‬
>
>> The wikitext snippet you posted appears to be seriously broken. More
>> precisely: It is unbalanced. Technically, there is no such thing as
>> "broken" wikitext. The parser will always output something (as he does
>> in the example). However, this doesn't mean such wikitext is ok. Sure,
>> nobody is stopping anyone from writing unbalanced code. But it becomes
>> unpredictable (as the example shows), unreliable, and effectively
>> unmaintainable as it starts to heavily depend on quirky internal
>> details of the parsers implementation, how it approaches certain
>> aspects, and in which order they are processed.
>>
>> The bigger problem here is this: Even if you figure out how the parser
>> works right now, it might change, as it already did many times. Have a
>> look at pages like https://www.mediawiki.org/wiki/Markup_spec to get
>> an idea of how complex this topic is, and how many people tried how
>> many times to nail it down, all failing for one or the other reason.
>> Code like the one you showed depends so much on the tiniest
>> implementation detail of the parsing process, it becomes so fragile
>> that it might break any day for reasons nobody could ever anticipate
>> without a warning.
>>
>> Please balance your wikitext.
>>
>> Best
>> Thiemo
>>
>> _______________________________________________
>> Wikitech-l mailing list
>> [hidden email]
>> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
>
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: The ref tag parameter follow in non wikisource wikis

Thiemo Kreuz
In reply to this post by יגאל חיטרון
> I expect from the parser to parse wiki markup before parsing html tags […]

As I said. As neither the wiki markup nor the XML tags in the given
example are valid, one can't expect anything. Seriously. Code like
<ref>{{cite|</ref>}} is just broken. It's like having two nested Klein
bottles. Both structural elements are inside and outside the same
time.

What do you even want to achieve?

Best
Thiemo

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: The ref tag parameter follow in non wikisource wikis

יגאל חיטרון
I think I was not clear enough. I know the code is broken, and I know noone
should use it. I show it as a symptom of the system problem - wrong
precedence order implemented in the parser.
Igal


‫בתאריך יום ה׳, 13 בדצמ׳ 2018 ב-19:03 מאת ‪Thiemo Kreuz‬‏ <‪
[hidden email]‬‏>:‬

> > I expect from the parser to parse wiki markup before parsing html tags
> […]
>
> As I said. As neither the wiki markup nor the XML tags in the given
> example are valid, one can't expect anything. Seriously. Code like
> <ref>{{cite|</ref>}} is just broken. It's like having two nested Klein
> bottles. Both structural elements are inside and outside the same
> time.
>
> What do you even want to achieve?
>
> Best
> Thiemo
>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l