Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Add certain kwd-group #5

Merged
merged 11 commits into from
Mar 8, 2019
Merged

Conversation

thewilkybarkid
Copy link
Contributor

No description provided.

src/support.sch Outdated
title
or @kwd-group-type
" role="warn">
&lt;<name/>&gt; must have a @kwd-group-type or a &lt;title&gt;.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it stands, we actually require a @kwd-group-type. Probably makes sense to allow only a <title> since that's used for the heading if it exists?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@fred-atherden fred-atherden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thewilkybarkid I would suggest not specifying about title/kwd-group-type in the rule context and using report instead of assert since the 'or' operator is a little flaky in assert.

This should work:

<rule context="kwd-group">
    <report test="not(title) and not(@kwd-group-type)"
        role="warn">&lt;<name/>&gt; must have a @kwd-group-type or a &lt;title&gt;.</report>
</rule>

It makes sense to me to only allow title and kwd in kwd-group. There are no instances of any other element in eLife content.

@thewilkybarkid
Copy link
Contributor Author

@FAtherden-eLife Thanks, tweaked it a bit.

It makes sense to me to only allow title and kwd in kwd-group. There are no instances of any other element in eLife content.

That's what we'll have for now. <compound-kwd> etc are already ignored:

<?expected-error message="<compound-kwd> is ignored." node="/compound-kwd"?>

src/support.sch Outdated Show resolved Hide resolved
src/support.sch Outdated Show resolved Hide resolved
@thewilkybarkid thewilkybarkid merged commit 84a3d3e into libero:master Mar 8, 2019
@thewilkybarkid thewilkybarkid deleted the kwd-group branch March 8, 2019 11:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants