-
Notifications
You must be signed in to change notification settings - Fork 31
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Testing a function/template that returns an attribute with x:expect/@test #59
Comments
I was going to file an issue regarding this. test/*.xspec files do not pass validation due to |
Another workaround (without worrying about ...
</x:call>
<x:expect label="Works OK" select="_null/@class">
<_null class="value"/>
</x:expect> |
Thank you for the workaround, that should do the trick for now! The solution was right under my nose though... |
@AxelCourt : thanks for uncovering the issue of @AirQuick : thanks for providing support to @AxelCourt. Shall we raise a ticket for assessing the inclusion of |
Though there is a workaround, I think this is a bug. I have a possible fix. Will submit it in a few days. |
That's fine, feel free to send a pull request for this. |
@AxelCourt : Ok, let's keep this issue open until @AirQuick submits a pull request. We will address this in v0.6.0. |
Hello ! @AirQuick sample from 01/11 doesn't work with 0.5.0, but was working before. Attached a sample. Best, |
Hi @cmarchand, |
You should be right, I've build xspec-maven-plugin just after the first announcement. It is important that we do not publish many versions of the same release, because it is confusing. For 0.6.0, we could publish RCx before publishing the 0.6.0. I check this. Thanks |
I've incorporated your "two attributes" case into the test cases for the proposed fix (not submitted yet). So your sample scenario should work reliably in the future. Regarding the versioning, I also remember the |
That's correct. I initially created the tag v0.5.0 back in November 2016 to allow @cmarchand to retrieve XSpec via a single zip file for his projects. When the official release was done in January 2017, I updated that tag with the latest release. I keep track of the changes we make in a release draft (I'm not sure you can see it in https://github.com/xspec/xspec/releases) but I will only make an official release at a specific point in time (and ask for approval from the XSpec community). All the latest changes are available in master branch but if you want to have a less bleeding edge and more stable release I suggest to use the official releases. |
Thanks a lot ! Regarding versionning, I build xspec-maven-plugin from release. |
I've submitted the pull request to fix this. Included @AxelCourt 's case and its possible workaround in Also included @cmarchand 's use case in With the fix, both cases should work. |
Hi,
Testing a function or a named template that returns an attribute seems to generate incorrect XSL code. See the attached example: test.zip.
Using
@test
with an XPath expression that returns a boolean value (where.
here is an attribute node) causes the generated XSL to fail with the following error:XTDE0420: Cannot create an attribute node (class) whose parent is a document node.
I managed to make the test work by using
<x:variable>
to create the expected result, and comparing it to the template result with@select
:Is there another way to test such a template or is this a bug?
Is the use of
<x:variable>
safe and/or recommended, since it is not in the RNG schema?Thanks.
Axel
The text was updated successfully, but these errors were encountered: