On Tue, Apr 16, 2013 at 2:25 AM, Charles Parnot
<[email protected]> wrote:
>
> <if type="article-journal">
> <or variable="volume issue" variable="volume" variable = "issue" />
> <text variable = "volume">
> <if />
>
> <if type="article-journal">
> <or variable="volume" />
> <or variable="volume" />
> <text variable = "volume">
> <if />
>
> <if type="article-journal">
> <and>
> <not variable="volume" />
> <or variable="issue" />
> <and />
> <text variable = "volume">
> <if />
>
> with some implicit `and` when multiple attributes are in the <if>, <and>,
> <or> or <not> nodes.
If we kept the "match" attribute around (and limit its scope to the
element it is used in), we wouldn't need cs:not, and we might even get
away with forgoing cs:or. In place of Frank's proposed cs:then (to
contain the output of the conditional), we could also nest the output
within the additional conditionals. Recasting Frank's unit test XML:
<choose>
<if type="article-journal" variable="volume issue" match="all">
<and-if is-numeric="volume issue" match="nand">
<text value="is an ARTICLE-JOURNAL with both VOLUME and
ISSUE, but one of them is non-numeric"/>
</and-if>
</if>
(I don't know what English term to introduce as a value for "match" to
cover "but one of them is non-numeric"; going with "nand" for now)
<else-if type="article-journal" variable="volume issue"
is-numeric="volume issue" match="all">
<text value="is an ARTICLE-JOURNAL with both VOLUME and
ISSUE, and both of them are numeric"/>
</else-if>
(this one already works with current CSL)
<else-if type="article-journal" match="none">
<and-if variable="edition">
<text value="is not an ARTICLE-JOURNAL, and has an EDITION"/>
</and-if>
</else-if>
<else-if type="book">
<and-if variable="edition" match="none">
<text value="is a BOOK, but has no EDITION"/>
</else-if>
<else-if type="chapter" variable="author" match="all">
<text value="is a CHAPTER, and has an AUTHOR"/>
</else-if>
(this one also already works with current CSL)
</choose>
----------
Rintze
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
xbiblio-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel