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

ISO/IEC Coding Guidelines: code and preformatted text #218

Closed
Intelligent2013 opened this issue Sep 7, 2022 · 2 comments
Closed

ISO/IEC Coding Guidelines: code and preformatted text #218

Intelligent2013 opened this issue Sep 7, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Intelligent2013
Copy link
Contributor

Source: #190

Currently, mnconvert converts both code and preformat into:

[source]
--
...
---

but they should processed differently for backward Metanorma XML to NISO STS XML conversion. But at this moment I don't figure out how to separate them.

@Intelligent2013
Copy link
Contributor Author

code Best Attribute Practice (https://www.niso-sts.org/TagLibrary/niso-sts-TL-1-0-html/element/code.html):
The various semantic attributes should be used to name the type of code, the language, the intended platform(s), etc.

preformat Best Practice (https://www.niso-sts.org/TagLibrary/niso-sts-TL-1-0-html/element/preformat.html)
Although it is possible to use <preformat> to tag any format-preserving object, some of these objects have semantic elements that should be used in preference, for example:
Programming code, scripts, pseudo-code, DTDs and Schemas, and XML instances should be tagged with the [<code>](https://www.niso-sts.org/TagLibrary/niso-sts-TL-1-0-html/element/code.html) element, making full use of its attributes to identify the type of code.

So, if sourcecode doesn't have the attribute lang, then it will be converted to the element preformat.

@Intelligent2013 Intelligent2013 moved this from 🆕 New to 🏗 In progress in Metanorma Jul 26, 2023
Intelligent2013 added a commit that referenced this issue Jul 26, 2023
mn2xml.xsl updated for preformat code, #218
@Intelligent2013
Copy link
Contributor Author

Done.

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Metanorma Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

1 participant