Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appendix C (Elements) should always mention how many elements there are #1517

Closed
jamescummings opened this issue Oct 11, 2016 · 10 comments
Closed

Comments

@jamescummings
Copy link
Member

Appendix C (Elements) should always mention how many elements there are. We already have a bespoke TEI processing instruction used in http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ST.html#STECST to produce a count of the number of elements. I'm suggesting that the Elements appendix at http://www.tei-c.org/release/doc/tei-p5-doc/en/html/REF-ELEMENTS.html have a bit of prose at the top that says something like:

"As of release X.X.X there are YYY elements available in the TEI"

Or some better prose (please make suggestions). I keep coming across this because I always forget where the processing instructions we already have are displayed and when I'm looking at the elements appendix I want to know in order that I can use that number next time I'm talking about the TEI. This would just simplify that. ;-)

I'm assuming, since this page is generated at build time, that it wouldn't be too hard to find the bit of code that does it and add this in, ha ha. I'm also assuming that it isn't objectionable and a minor non-urgent feature request. Starting out with status:go.

@martindholmes
Copy link
Contributor

This is a lovely task for our Stylesheets study group.

@laurentromary
Copy link
Contributor

This is a very good initiative @jamescummings . This is not an uncommon request and a sign of maturity to the outside that we can trace such information.

@ebeshero
Copy link
Member

@martindholmes @jamescummings I agree, this is perfect for the Stylesheets study group--except I want to write a new stylesheet to do it and not try to figure out which old stylesheet it's supposed to go into!

@martindholmes
Copy link
Contributor

Actually it's the template beginning on line 82 of expand.xsl in the TEI/P5/Utilities folder in the TEI repo, not in the Stylesheets, so it's not something for our group at all.

@lb42
Copy link
Member

lb42 commented Oct 12, 2016

Is it so hard to load p5subset.xml into Oxygen and type count(//elementSpec) ? Not sure whether just inserting the same PI as is used in ST would do the trick though, since we're talking about text generated within the stylesheets somewhere. I'd have thought finding out how that generation works would be on the agenda for the Stylesheets study group but wdik.

@martindholmes
Copy link
Contributor

I take James's point that it's a handy thing to be able to check the Guidelines for the current element count. We should at least be able to call the same function (or abstract it and call it, if it's too contextually-embedded). But I also like the idea of a generic function in ODD processing that gives the count of elements (and perhaps one for attributes too, although it's harder to figure out what that actually means).

@jamescummings
Copy link
Member Author

Added a line about this to the top of

http://jenkins.tei-c.org/job/TEIP5-dev/2906/artifact/P5/release/doc/tei-p5-doc/en/html/REF-ELEMENTS.html

Question is should I add similar short paragraphs to the other appendices?

@martinascholger
Copy link
Member

Definitely very useful for the Attributes, not sure if acutally needed for classes and datatypes.

@martindholmes
Copy link
Contributor

@martinascholger It's hard to figure out how to do such a count for attributes. How many @type attributes are there?

@jamescummings
Copy link
Member Author

@martindholmes Well you could say that about anything, including modified elements. In this case the appendices list a certain number of things which conveniently are count(distinct-values(//thing/@ident)). I've added some counts for all the other appendices as well by editing P5/Utilities/expand.xsl. However there is currently a release on, so I've committed it to my local git but won't push it until that is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants