-
Notifications
You must be signed in to change notification settings - Fork 8
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
Display deprecation notice in generated documentation #115
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only suggestions I have are syntax sugar - nice work here, @nikitawootten-nist.
@@ -152,6 +153,7 @@ | |||
</div> | |||
<xsl:where-populated> | |||
<div class="body"> | |||
<xsl:apply-templates select="$definition/@deprecated"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! adding to the default traversal by selecting and processing the attribute.
@@ -65,7 +65,7 @@ | |||
<div class="model-entry definition { tokenize($me/@_metaschema-json-id,'/')[2] }"> | |||
<xsl:variable name="header-class" expand-text="true">{ if (exists(parent::map)) then | |||
'definition' else 'instance' }-header</xsl:variable> | |||
<div class="{ $header-class }"> | |||
<div class="{ $header-class }{ if (exists($me/@deprecated)) then ' deprecated-header' else '' }"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to tightening the path I might put this expression into the $header-class
variable, as it already templates this ... no biggie, certainly.
Committer Notes
Display deprecation in generated documentation.
Include an example of a deprecated definition in the "everything" test metaschema
Display deprecation in reference documentation
.deprecated-header
class is applied to item headers, which could be used for additional styling in the futureDisplay deprecation in definition documentation
.deprecated-header
class is applied to item headers, which could be used for additional styling in the futureDisplay deprecation in outline documentation
.OM-name-deprecated
class is applied to outline links, which is styled in the example CSS as strike-through text.Test the implementation on the OSCAL-Reference
Note that I decided displaying deprecation notices in the index documentation, as the index does not show any other details.
All Submissions:
Changes to Core Features: