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

handle <constraintDecl> from extract-isosch.xsl #698

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

sydb
Copy link
Member

@sydb sydb commented Sep 20, 2024

Addresses issue #696.
Process new <constraintDecl> element: use its @queryBinding attr, copy over its <sch:ns> elements into the declared NS section, and all other child elements into a new declarations section.

queryBinding= attr, copy over its sch:ns elements into declared NS section, and
all other child elements into a new declarations section.
@sydb sydb added this to the Release 7.58.0 milestone Sep 20, 2024
<!-- For each pair (except those that are empty or are the XLS namespace) ... -->
<xsl:for-each select="$NSs[ not(. eq '␝') and not( contains( ., $xsl-ns ) ) ]">
<!-- For each pair (except those that are empty or are the XSL namespace) ... -->
<xsl:for-each select="$NSs[ not( . eq '␝' or contains( ., $xsl-ns ) ) ]">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment here seems slightly inaccurate, since this is saying all of the $NSs except the ones that are equal to the group separating character (␝)(https://www.compart.com/en/unicode/U+241D)or that contain the XSL namespace. I would assume this means that empty ones could conceivably make it through?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhhh … No to the ultimate question, but maybe phrasing and test should be a little more precise, here.
An “empty” one, i.e. (presumably) an element that has been decorated with both an empty @nsp and an empty @nsu would end up being the single character , and thus match the first comparison.
The contains() is meant to ensure that we do not generate a <sch:ns> for the XSLT namespace here in the implicit section. (I am not sure why we are worried about it — would it hurt anything if it were generated?) But of course it is not testing equality, so in fact if someone (bizarrely) had a namespace URI of “this-is-not-http://www.w3.org/1999/XSL/Transform_NOT”, this test would incorrectly see it as the XSLT namespace and fail to generate the needed <sch:ns>. So I think that should be updated to matches( ., '␝'||$xsl-ns||'$').

odds/extract-isosch.xsl Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants