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

Update to XSLTForms 1.3, released Dec. 2018 #3

Merged
merged 8 commits into from
May 4, 2020

Conversation

joewiz
Copy link
Member

@joewiz joewiz commented Mar 4, 2018

No description provided.

@dizzzz
Copy link
Member

dizzzz commented Mar 5, 2018

Please could you add a LICENSE file? I can't find one...

@joewiz
Copy link
Member Author

joewiz commented Jul 24, 2019

@AlainCouthures As mentioned via Twitter, do you have a LICENSE file?

@joewiz
Copy link
Member Author

joewiz commented Jul 24, 2019

Once the LICENSE is sorted, I can update this PR with the assets from XSLTForms 1.3, the current download from http://www.agencexml.com/xsltforms.htm. Is that what you'd recommend, Alain?

@AlainCouthures
Copy link
Contributor

AlainCouthures commented Jul 25, 2019 via email

@joewiz
Copy link
Member Author

joewiz commented May 2, 2020

@AlainCouthures Thank you!

@dizzzz The license is now in the PR, and I've updated to the current stable release from http://www.agencexml.com/xsltforms.htm.

@joewiz joewiz requested a review from dizzzz May 2, 2020 21:57
@joewiz
Copy link
Member Author

joewiz commented May 2, 2020

@AlainCouthures Could you offer a suggestion on what might cause the phenomenon with colors.xml that the browser returns an error, pointing to this portion of the transformed source:

<script type="text/javascript" id="myscript"><?javax.xml.transform.disable-output-escaping?>/* &lt;![CDATA[ */
<?javax.xml.transform.enable-output-escaping?><?javax.xml.transform.disable-output-escaping?>
			function luminosity(c) {
				var r = parseInt(c.substr(1,2), 16);
				var g = parseInt(c.substr(3,2), 16);
				var b = parseInt(c.substr(5,2), 16);
				return 0.2126 * Math.pow(r/255, 2.2) + 0.7152 * Math.pow(g/255, 2.2) + 0.0722 * Math.pow(b/255, 2.2);
			}
		<?javax.xml.transform.enable-output-escaping?>
<?javax.xml.transform.disable-output-escaping?>/* ]]&gt; */
<?javax.xml.transform.enable-output-escaping?>
        </script>

Does it look like eXist is failing to respect the disable-output-escaping="yes" directives here in xsltforms.xsl:

<xsl:template match="xhtml:script[not(@type) or @type = 'text/javascript' or @type = 'text/javascript-runonce'] | script[not(@type) or @type = 'text/javascript' or @type = 'text/javascript-runonce']">
	<script type="text/javascript">
		<xsl:apply-templates select="@*[local-name() != 'type']"/>
		<xsl:text disable-output-escaping="yes">/* &lt;![CDATA[ */
</xsl:text>
		<xsl:value-of select="." disable-output-escaping="yes"/>
		<xsl:text>
</xsl:text>
		<xsl:text disable-output-escaping="yes">/* ]]&gt; */
</xsl:text>
	</script>
</xsl:template>

If you have any suggestions on what this transformation suggests, I might be able to fix the error raised when opening colors.xml in eXist, before the next release of the eXist package containing XSLTForms 1.3. (At worst we can fix this in a future release of the package.) Thanks for any hints!

@dizzzz
Copy link
Member

dizzzz commented May 3, 2020

Great work @joewiz !

@adamretter adamretter merged commit 4f0c342 into eXist-db:master May 4, 2020
@joewiz
Copy link
Member Author

joewiz commented May 4, 2020

@adamretter Thank you! Would you please merge the corresponding PR, eXist-db/xsltforms-demo-app#3, as well?

@joewiz joewiz deleted the xsltforms-1.0 branch May 4, 2020 18:41
@joewiz joewiz changed the title Update to XSLTForms 1.0, released Oct. 2017 Update to XSLTForms 1.3, released Dec. 2018 May 4, 2020
@AlainCouthures
Copy link
Contributor

AlainCouthures commented May 10, 2020 via email

@joewiz
Copy link
Member Author

joewiz commented May 10, 2020

@AlainCouthures Thanks very much for your feedback! I look forward to the release of the new version and will gladly update the eXist packages if they still seem useful.

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

Successfully merging this pull request may close these issues.

4 participants