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

Reference XLST from the standard name XML #231

Open
DocOtak opened this issue Oct 23, 2024 · 2 comments
Open

Reference XLST from the standard name XML #231

DocOtak opened this issue Oct 23, 2024 · 2 comments
Labels
GitHub CF use of GitHub

Comments

@DocOtak
Copy link
Member

DocOtak commented Oct 23, 2024

As an experiment in space/processing savings and since every browser supports XLM stylesheets. I tried referencing the XML style sheet from the standard name XML and letting the browser make the html name table itself. I needed to update the stylesheet a little since it was not producing very valid HTML, divs in the head block, a paragraph element in the table, etc... I also added some javascript to do the link processing (what the python script does). I found that this works quite well. Adopting the style sheet reference and letting the browsers do their thing could simplify the standard name publishing to be only making a new XML and none of the other steps. We would save a significant amount of space not having the preprocessed standard name html tables in github.

The following line was added to the standard name XML to do this:

<?xml-stylesheet type="text/xsl" href="cf-standard-name-table-1.3.xsl" ?>

For my own convenience, I reused the KWIC repository on my own github account for this experiment.

Here is the example on my own site: https://www.andrewbarna.org/cf_kwic/cf-standard-name-table.xml
For the HTML links you just link to the XML:

<a href="https://www.andrewbarna.org/cf_kwic/cf-standard-name-table.xml">HTML</a>

To download the XML you would make the a tags have a download attribute:

<a href="https://www.andrewbarna.org/cf_kwic/cf-standard-name-table.xml" download>XML</a>

Github strips that attribute in these issues so I cannot show a demo.

Like the KWIC indexer example I made, we could put a "download HTML" link/button in that generated template so the people can actually download the generated HTML for offline use.

@DocOtak DocOtak added the GitHub CF use of GitHub label Oct 23, 2024
@JonathanGregory
Copy link
Contributor

Dear Barna @DocOtak

That's a very good idea, which saves redundancy and space. It's remarkable to see, and it's pretty fast, but slower than loading the ready-made HTML. Would it be faster on the GitHub site, do you think? If it's bound to be discernibly slower, perhaps we ought to keep the current HTML only as such, since that's looked at much more often than all the old versions, for which we could use this on-the-fly method.

Best wishes

Jonathan

@larsbarring
Copy link

larsbarring commented Oct 28, 2024

As you are looking at the XSLT file you might want to have a look at cf-convention.github.io/#471, and perhaps also at cf-convention.github.io/issues/186 although the latter is more on text content than technical aspects.

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

No branches or pull requests

3 participants