usnistgov / xslt-blender

XML/XSLT processing in the browser, supported by a Typescript library
Other
7 stars 2 forks source link

OSCAL Styler: Stylesheet does not parse #57

Closed aj-stein-nist closed 1 year ago

aj-stein-nist commented 1 year ago

When using the current version of OSCAL Styler with the following example SSP I receive the following error message in the console and a similar error message about a stylesheet failing to parse:

XML Parsing Error: no root element found
Location: https://pages.nist.gov/xslt-blender/oscal-styler/
Line Number 1, Column 1:
wendellpiez commented 1 year ago

This is what happens when the XSLT field is blank.

The error is unavoidable as long as it is blank, but the fact that it is blank could be made more obvious.

In back, the function could also provide for "XSLT is blank" being messaged somewhere, maybe with an alert.

The next commit will have code to provide better error messaging. Also:

aj-stein-nist commented 1 year ago

It turns out that, until a few days ago when you were demoing it to me and someone else, that I was unaware the starter XSLT was not loaded by default. Reading this message and reflecting on what I saw makes this, well, super obvious. I did not understand that when I quickly tested the first time ... somehow. I shall close!

wendellpiez commented 1 year ago

Yeah you exposed a design flaw 🥇