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

fix: trim names while gathering specs #803

Merged
merged 11 commits into from
Mar 6, 2020
Merged

Conversation

AirQuick
Copy link
Member

@AirQuick AirQuick commented Mar 2, 2020

https://www.w3.org/TR/xslt-30/#qname (bold by me)

[Definition: An EQName is a string representing an expanded QName where the string, after removing leading and trailing whitespace, is in the form defined by the EQName...
[Definition: A lexical QName is a string representing an expanded QName where the string, after removing leading and trailing whitespace, is within the lexical space of the xs:QName datatype as defined in XML Schema...

XSpec does not perform the bold part. Names with leading or trailing whitespace sometimes work, sometimes crash XSpec. Inconsistent, at least.
This pull request fixes it by trimming names while gathering specs. Tests are incorporated into test/xspec-eqname*.xspec.

@AirQuick AirQuick added the bug label Mar 2, 2020
@AirQuick AirQuick added this to the v1.6.0 milestone Mar 2, 2020
@commit-lint
Copy link

commit-lint bot commented Mar 2, 2020

Tests

  • test user-defined variable XSpec URIQualifiedName (698c96d)
  • leading and trailing whitespace in names (d99166e)
  • xslt: sync xspec-no-prefix_stylesheet.xspec (0c6a690)

Features

  • xslt: utility functions for trimming whitespace (f6238b8)

Bug Fixes

  • trim names while gathering specs (d834fc7)
  • xslt: trim x:*/attribute(template) (27c6f4a)

Styles

Contributors

@AirQuick

@AirQuick AirQuick merged commit 32a84e4 into xspec:master Mar 6, 2020
@AirQuick AirQuick deleted the space-name branch March 6, 2020 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant