citeproc-0.10: test/csl/page_Expand.txt
>>===== MODE =====>>
citation
<<===== MODE =====<<
>>===== DESCRIPTION =====>>
Per the CSL documentation (link below), dashes are standardized for page ranges
but not everything with a dash is a valid page range. Valid page ranges are
numbers with the same or no prefix.
For example, 110–115 and N110–N115 are valid page ranges but 110-N6 is not and
thus retains its original dash character.
https://docs.citationstyles.org/en/stable/specification.html#range-delimiters
<<===== DESCRIPTION =====<<
>>===== RESULT =====>>
Example: minimal, at 110–115
Example: prefix on first number only, at N110-5
Example: same prefix on both numbers, at N110–N115
Example: prefix on last number only, at 110-N6
Example: different prefixes on both numbers, at N110-P5
Example: leading number before prefix, at 123N110-N5
Example: multiple ranges, at 123N110-N5, 456K200-99
Example: first less than second, at 123N110-N5, 000c23-22
<<===== RESULT =====<<
>>===== INPUT =====>>
[
{
"id": "ITEM-1",
"page": "110-5",
"title": "Example: minimal",
"type": "book"
},
{
"id": "ITEM-2",
"page": "N110 - 5",
"title": "Example: prefix on first number only",
"type": "book"
},
{
"id": "ITEM-3",
"page": "N110 - N5",
"title": "Example: same prefix on both numbers",
"type": "book"
},
{
"id": "ITEM-4",
"page": "110 - N6",
"title": "Example: prefix on last number only",
"type": "book"
},
{
"id": "ITEM-5",
"page": "N110 - P5",
"title": "Example: different prefixes on both numbers",
"type": "book"
},
{
"id": "ITEM-6",
"page": "123N110 - N5",
"title": "Example: leading number before prefix",
"type": "book"
},
{
"id": "ITEM-7",
"page": "123N110 - N5, 456K200 - 99",
"title": "Example: multiple ranges",
"type": "book"
},
{
"id": "ITEM-8",
"page": "123N110 - N5, 000c23 - 22",
"title": "Example: first less than second",
"type": "book"
}
]
<<===== INPUT =====<<
>>===== CITATION-ITEMS =====>>
[
[
{
"id": "ITEM-1"
}
],
[
{
"id": "ITEM-2"
}
],
[
{
"id": "ITEM-3"
}
],
[
{
"id": "ITEM-4"
}
],
[
{
"id": "ITEM-5"
}
],
[
{
"id": "ITEM-6"
}
],
[
{
"id": "ITEM-7"
}
],
[
{
"id": "ITEM-8"
}
]
]
<<===== CITATION-ITEMS =====<<
>>===== CSL =====>>
<style
xmlns="http://purl.org/net/xbiblio/csl"
class="note"
version="1.0"
page-range-format="expanded">
<info>
<id />
<title />
<updated>2009-08-10T04:49:00+09:00</updated>
</info>
<citation>
<layout>
<text variable="title"/>
<text variable="page" prefix=", at "/>
</layout>
</citation>
</style>
<<===== CSL =====<<
>>===== VERSION =====>>
1.0
<<===== VERSION =====<<