Difference between revisions of "Template:Citation/core/sandbox3"

From blackwiki
Jump to navigation Jump to search
imported>Wikid77
(reloaded from August 2012; put 14 gated-if structures to speed the check of rare options, such as Surname2 as 16x faster to skip Surname3+, or 3x faster by if {JSTOR|JFM|LCCN|.. PMID..|SSRN |ZBL|ID}.)
imported>Wikid77
(on 14 gated-if structures, unnested the gateway parameters.)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<span class="citation {{{Citation class|{{{Citation type|}}}}}}"
+
<noinclude><!--
 +
--
 +
--    This version, Template:Citation/core/sandbox3, is being used to
 +
--    test faster techniques for checking the parameters. Due to major
 +
--    changes, it might not always work like {Citation/core}.
 +
--
 +
--    As of 13 August 2012, this ran 30% faster than {Citation/core}.
 +
--
 +
* core now: {{Citation/core |Title=Rarrgl | Series=Ser34 |URL=x.com}}
 +
* core/sb3: {{Citation/core/sandbox3 |Title=Rarrgl | Series=Ser34 |URL=x.com}}
 +
--
 +
--></noinclude><span class="citation {{{Citation class|{{{Citation type|}}}}}}"
 
{{
 
{{
 
   #switch:{{{Ref|}}}
 
   #switch:{{{Ref|}}}
Line 250: Line 261:
 
   #if: {{{IncludedWorkTitle|}}}{{#if:{{{Periodical|}}}||{{#if:{{{TransItalic|}}}||{{{TransTitle|}}}}}}}
 
   #if: {{{IncludedWorkTitle|}}}{{#if:{{{Periodical|}}}||{{#if:{{{TransItalic|}}}||{{{TransTitle|}}}}}}}
 
   |{{
 
   |{{
     #if:{{{Surname1|{{{EditorSurname1|}}} }}}
+
     #if:{{{Surname1|}}}{{{EditorSurname1|}}}
 
     |{{{Sep|,}}}&#32;
 
     |{{{Sep|,}}}&#32;
 
   }}{{Citation/make link
 
   }}{{Citation/make link
Line 351: Line 362:
 
     |{{{Sep|,}}}&#32;{{{Other|}}}
 
     |{{{Sep|,}}}&#32;{{{Other|}}}
 
   }}{{
 
   }}{{
     #if: {{{Surname1|{{{EditorSurname1|{{{IncludedWorkTitle|}}} }}} }}}
+
     #if: {{{Surname1|}}}{{{EditorSurname1|}}}{{{IncludedWorkTitle|}}}
 
     |{{{Sep|,}}}&#32;}}{{
 
     |{{{Sep|,}}}&#32;}}{{
     #if: {{{Title|{{{TransTitle|}}} }}}
+
     #if: {{{Title|}}}{{{TransTitle|}}}
 
     |{{Citation/make link
 
     |{{Citation/make link
 
         | 1={{
 
         | 1={{
Line 382: Line 393:
 
   }}
 
   }}
 
}}{{
 
}}{{
   #if: {{{language|{{{format|}}} }}}|{{
+
   #if: {{{language|}}}{{{format|}}}|{{
 
     #if: {{{language|}}}
 
     #if: {{{language|}}}
 
     |&#32;(in {{{language}}})
 
     |&#32;(in {{{language}}})
Line 392: Line 403:
 
   #if: {{{Periodical|}}}
 
   #if: {{{Periodical|}}}
 
   |{{
 
   |{{
       #if:{{{Title|{{{IncludedWorkTitle|{{{TransTitle|}}} }}} }}}
+
       #if:{{{Title|}}}{{{IncludedWorkTitle|}}}{{{TransTitle|}}}
 
       |{{{Sep|,}}}&#32;
 
       |{{{Sep|,}}}&#32;
 
     }}''<nowiki />{{{Periodical}}}<nowiki />''{{
 
     }}''<nowiki />{{{Periodical}}}<nowiki />''{{
Line 410: Line 421:
 
     }}{{
 
     }}{{
 
       #if: {{{Volume|}}}
 
       #if: {{{Volume|}}}
       |&#32;{{#if:{{{Periodical|}}}|'''<nowiki />{{{Volume}}}'''|{{{Volume}}}}}{{
+
       |&#32;'''<nowiki />{{{Volume}}}'''
        #if: {{{Issue|}}}
+
    }}{{
        |&#32;({{{Issue}}})
+
       #if: {{{Issue|}}}
      }}
+
      |&#32;({{{Issue}}})
       |{{
 
        #if: {{{Issue|}}}
 
        |&#32;({{{Issue}}})
 
      }}
 
 
     }}{{
 
     }}{{
 
       #if: {{{At|}}}
 
       #if: {{{At|}}}
Line 424: Line 431:
 
   |{{
 
   |{{
 
       <!--============ Anything else with a title, including books ============-->
 
       <!--============ Anything else with a title, including books ============-->
       #if: {{{Title|{{{TransItalic|}}} }}}
+
       #if: {{{Title|}}}{{{TransItalic|}}}
 
       |{{
 
       |{{
         #if: {{{Surname1|{{{EditorSurname1|{{{IncludedWorkTitle|<!--
+
         #if: {{{Surname1|}}}{{{EditorSurname1|}}}{{{IncludedWorkTitle|}}}<!--
             -->{{{Periodical|}}} }}} }}} }}}
+
             -->{{{Periodical|}}}
 
         |{{{Sep|,}}}
 
         |{{{Sep|,}}}
 
       }}&#32;{{Citation/make link
 
       }}&#32;{{Citation/make link
Line 449: Line 456:
 
       }}
 
       }}
 
     }}{{
 
     }}{{
       #if: {{{Volume|{{{TitleType|{{{Series|{{{Other|{{{Edition|<!--
+
       #if: {{{Volume|}}}{{{TitleType|}}}{{{Series|}}}{{{Edition|}}}<!--
       -->}}} }}} }}} }}} }}}
+
       -->{{{Other|}}}
 
       |{{
 
       |{{
 
         #if: {{{TitleType|}}}
 
         #if: {{{TitleType|}}}
Line 467: Line 474:
 
         |&#32;({{{Edition}}} ed.)
 
         |&#32;({{{Edition}}} ed.)
 
       }}
 
       }}
     }}<!--endif {Volume|TitleType|Series|Other|Edition}
+
     }}<!--endif {Volume/TitleType/Series/Edition/Other}
 
  -->{{
 
  -->{{
 
       #if: {{{PublicationPlace|}}}
 
       #if: {{{PublicationPlace|}}}
Line 481: Line 488:
 
}}{{
 
}}{{
 
<!--============ Date (if no author/editor) ============-->
 
<!--============ Date (if no author/editor) ============-->
   #if: {{{Surname1|{{{EditorSurname1|}}} }}}
+
   #if: {{{Surname1|}}}{{{EditorSurname1|}}}
 
   |
 
   |
 
   |{{
 
   |{{
Line 519: Line 526:
 
   }}
 
   }}
 
}}{{
 
}}{{
   #if: {{{ARXIV|{{{ASIN|{{{BIBCODE|{{{DOI|}}} }}} }}} }}}
+
   #if: {{{DOI|}}}{{{ARXIV|}}}{{{ASIN|}}}{{{BIBCODE|}}}
 
|{{
 
|{{
 
<!--============ arXiv ==============-->
 
<!--============ arXiv ==============-->
Line 537: Line 544:
 
   |{{{Sep|,}}}&#32;{{citation/identifier  |identifier=doi |input1={{{DOI|}}}  |input2={{{DoiBroken|}}} |input3={{{template doc demo|}}}}}
 
   |{{{Sep|,}}}&#32;{{citation/identifier  |identifier=doi |input1={{{DOI|}}}  |input2={{{DoiBroken|}}} |input3={{{template doc demo|}}}}}
 
   }}
 
   }}
}}<!--endif {ARXIV|ASIN|BIBCODE|DOI}-->{{
+
}}<!--endif {ARXIV/ASIN/BIBCODE/DOI}-->{{
 
<!--============ ISBN ===============-->
 
<!--============ ISBN ===============-->
 
   #if: {{{ISBN|}}}
 
   #if: {{{ISBN|}}}
Line 546: Line 553:
 
   |{{{Sep|,}}}&#32;{{citation/identifier  |identifier=issn |input1={{{ISSN|}}} }}
 
   |{{{Sep|,}}}&#32;{{citation/identifier  |identifier=issn |input1={{{ISSN|}}} }}
 
}}{{
 
}}{{
   #if:{{{JSTOR|{{{JFM|{{{LCCN|{{{MR|{{{OCLC|{{{OL|{{{OSTI|<!--
+
   #if:{{{JSTOR|}}}{{{JFM|}}}{{{LCCN|}}}{{{MR|}}}{{{OCLC|}}}{{{OL|}}}<!--
     -->{{{PMC|{{{PMID|{{{RFC|{{{SSRN|{{{ZBL|{{{ID|<!--
+
     -->{{{OSTI|}}}{{{PMC|}}}{{{PMID|}}}{{{RFC|}}}{{{SSRN|}}}<!--
     -->}}} }}} }}} }}} }}} }}} }}} }}} }}} }}} }}} }}} }}}
+
     -->{{{ZBL|}}}{{{ID|}}}
 
|{{
 
|{{
 
<!--============ JFM ================-->
 
<!--============ JFM ================-->
Line 602: Line 609:
 
   |{{{Sep|,}}}&#32;{{{ID}}}
 
   |{{{Sep|,}}}&#32;{{{ID}}}
 
   }}
 
   }}
}}<!--endif {JSTOR|JFM|LCCN|...PMID..|SSRN|ZBL|ID}-->{{
+
}}<!--endif {JSTOR/JFM/LCCN/...PMID../SSRN/ZBL/ID}-->{{
 
<!--============  Archive data, etc ===========-->
 
<!--============  Archive data, etc ===========-->
 
#if: {{{Archive|}}}
 
#if: {{{Archive|}}}
 
|{{{Sep|,}}}&#32;{{{Archive}}}[[Category:Pages using deprecated citation archive parameters]]
 
|{{{Sep|,}}}&#32;{{{Archive}}}[[Category:Pages using deprecated citation archive parameters]]
 
|{{
 
|{{
   #if:{{{ArchiveURL|{{{ArchiveDate|}}} }}}
+
   #if:{{{ArchiveURL|}}}{{{ArchiveDate|}}}
 
   | {{{Sep|,}}}&#32;{{#ifeq: {{{DeadURL|}}} | no
 
   | {{{Sep|,}}}&#32;{{#ifeq: {{{DeadURL|}}} | no
 
     | {{#if:{{{ArchiveURL|}}}
 
     | {{#if:{{{ArchiveURL|}}}
Line 624: Line 631:
 
}}{{
 
}}{{
 
<!--============ URL and AccessDate ============-->
 
<!--============ URL and AccessDate ============-->
   #if: {{{URL|{{{IncludedWorkURL|}}} }}}{{#ifeq:{{{DeadURL|}}}|no|{{{ArchiveURL|}}}|}}
+
   #if: {{{URL|}}}{{{IncludedWorkURL|}}}{{#ifeq:{{{DeadURL|}}}|no|{{{ArchiveURL|}}}|}}
 
   |{{
 
   |{{
     #if: {{{Title|{{{IncludedWorkTitle|{{{TransTitle|}}} }}} }}}
+
     #if: {{{Title|}}}{{{IncludedWorkTitle|}}}{{{TransTitle|}}}
 
     |<span class="printonly">{{{Sep|,}}}&#32;{{
 
     |<span class="printonly">{{{Sep|,}}}&#32;{{
 
                                       #if: {{{IncludedWorkURL|}}}
 
                                       #if: {{{IncludedWorkURL|}}}
Line 712: Line 719:
 
       #if: {{{Publisher|}}} |&rft.pub={{urlencode:{{{Publisher}}}}}
 
       #if: {{{Publisher|}}} |&rft.pub={{urlencode:{{{Publisher}}}}}
 
     }}{{
 
     }}{{
     #if:{{{Volume|{{{Series|{{{Issue|{{{Edition|{{{ARXIV|<!--
+
     #if:{{{Volume|}}}{{{Series|}}}{{{Issue|}}}{{{Edition|}}}{{{ARXIV|}}}<!--
     -->{{{ASIN|{{{BIBCODE|{{{DOI|<!--
+
     -->{{{ASIN|}}}{{{BIBCODE|}}}{{{DOI|}}}
    -->}}} }}} }}} }}} }}} }}} }}} }}}
 
 
     |{{
 
     |{{
 
       #if: {{{Volume|}}} |&rft.volume={{urlencode:{{{Volume}}}}}
 
       #if: {{{Volume|}}} |&rft.volume={{urlencode:{{{Volume}}}}}
Line 732: Line 738:
 
       #if: {{{DOI|}}} |&rft_id=info:doi/{{urlencode:{{{DOI}}}}}
 
       #if: {{{DOI|}}} |&rft_id=info:doi/{{urlencode:{{{DOI}}}}}
 
     }}
 
     }}
     }}<!--endif {Volume|Series|...DOI}-->{{
+
     }}<!--endif {Volume/Series/.../DOI}-->{{
 
       #if: {{{ISBN|}}} |&rft.isbn={{urlencode:{{{ISBN}}}}}
 
       #if: {{{ISBN|}}} |&rft.isbn={{urlencode:{{{ISBN}}}}}
 
     }}{{
 
     }}{{
 
       #if: {{{ISSN|}}} |&rft.issn={{urlencode:{{{ISSN}}}}}
 
       #if: {{{ISSN|}}} |&rft.issn={{urlencode:{{{ISSN}}}}}
 
     }}{{
 
     }}{{
     #if:{{{JSTOR|{{{JFM|{{{LCCN|{{{MR|{{{OCLC|{{{OL|{{{OSTI|<!--
+
     #if:{{{JSTOR|}}}{{{JFM|}}}{{{LCCN|}}}{{{MR|}}}{{{OCLC|}}}{{{OL|}}}<!--
         -->{{{PMC|{{{PMID|{{{RFC|{{{SSRN|{{{ZBL|<!--
+
         -->{{{OSTI|}}}{{{PMC|}}}{{{PMID|}}}{{{RFC|}}}{{{SSRN|}}}{{{ZBL|}}}
        -->}}} }}} }}} }}} }}} }}} }}} }}} }}} }}} }}} }}}
 
 
     |{{
 
     |{{
 
       #if: {{{JFM|}}} |&rft.jfm={{urlencode:{{{JFM}}}}}
 
       #if: {{{JFM|}}} |&rft.jfm={{urlencode:{{{JFM}}}}}
Line 765: Line 770:
 
       #if: {{{ZBL|}}} |&rft_id=info:zbl/{{urlencode:{{{ZBL}}}}}
 
       #if: {{{ZBL|}}} |&rft_id=info:zbl/{{urlencode:{{{ZBL}}}}}
 
     }}
 
     }}
     }}<!--endif {JSTOR|JFM|LCCN|...PMID..|SSRN|ZBL|ID}-->{{
+
     }}<!--endif {JSTOR/JFM/LCCN/...PMID../SSRN/ZBL}-->{{
 
       #if: {{{URL|}}}{{{IncludedWorkURL|}}} |&rft_id={{urlencode:{{{URL|{{{IncludedWorkURL|}}}}}}}}
 
       #if: {{{URL|}}}{{{IncludedWorkURL|}}} |&rft_id={{urlencode:{{{URL|{{{IncludedWorkURL|}}}}}}}}
 
     }}&rfr_id=info:sid/en.wikipedia.org:{{FULLPAGENAMEE}}"><span style="display: none;">&nbsp;</span></span><noinclude>
 
     }}&rfr_id=info:sid/en.wikipedia.org:{{FULLPAGENAMEE}}"><span style="display: none;">&nbsp;</span></span><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 13:01, 13 August 2012

 

Template documentation[view] [edit] [history] [purge]

Usage

See also