Comments (7)
It is something that I've introduced in: Issue 17. I've overridden the template name generation so I can control which templates are invoked through a driver XSLT that imports the compiled XSLT. When I closed the issue I said "the chances for two scenarios to have the same name are pretty slim so I've decided to leave it like this for now". Boy, was I wrong!!!
By the way, is this something that happens quite often? Leaving the same label for multiple scenarios? Or was it just an intermediate step? I know that the label is hardly an ID but I was hoping people treat it a bit like one.
from oxygen-xml-editor-xspec-support.
Ok, I understand. :-)
Well, I think it is not a bad requirement to have unique labels, but:
-
I took a while, until I found the reason for the duplicated templates. So at least a (Schematron) validtion would help. I think it can happen very easy, during dirty work on your XSpec script (just copy a scenario, make some changes, try it out - and fail, because you didn't change the label...)
-
In my case I have two scenarios as Test groups and inside I test similar stuff with different sub scenarios. So the sub scenarios have unique labels inside of the group, but not in the whole sheet:
<x:scenario label="group 1">
<x:scenario label="test 1">...</x:scenario>
<x:scenario label="test 2">...</x:scenario>
</x:scenario>
<x:scenario label="group 2">
<x:scenario label="test 1">...</x:scenario>
<x:scenario label="test 2">...</x:scenario>
</x:scenario>
So one (simple i hope) enhancement would be, to take the nested scenario labels into account for the template names.
from oxygen-xml-editor-xspec-support.
Both of these points are valid.
- I'm sorry for the wasted time... I supposed I could also analyze the exceptions and if the "XTSE0660" code is present I could give a hint about the possible cause.
- Yes, I can definitely take the labels of the ancestors into account when generating the ID.
I'll do these as soon as I have some spare time.
from oxygen-xml-editor-xspec-support.
Thanks Alex! Don't worry about my time. It is normal for me to I try to understand an error, before I post it somewhere. I just wanted to point out, how helpful a validation or a concrete error message would be for this issue.
from oxygen-xml-editor-xspec-support.
Hi Alex,
just an annotation to this. I run in the same problem, if I use x:like for one scenario, which contains other scenarios.
Example:
<x:scenario label="Shared" shared="yes">
<x:scenario label="Sub scenario">
<x:expect label="copy">
<table/>
</x:expect>
</x:scenario>
</x:scenario>
<x:scenario label="Scenario 1">
<x:context>
<table class="xyz"/>
</x:context>
<x:like label="Shared"/>
</x:scenario>
<x:scenario label="Scenario 2">
<x:context>
<table class="abc"/>
</x:context>
<x:like label="Shared"/>
</x:scenario>
Scenario 1 and 2 are using the scenario "Shared", "Shared" contains other scenarios.
With the Ant XSpec framework it works, with the plugin I get the Duplicate named template error.
Maybe, this should be respected during the fix. I think this is a real case, though it is special. My use case: I have a complex test scenario tree and want to test two different context variants. The differences shouldn't have an influence of the tests.
Best Regards,
Nico
from oxygen-xml-editor-xspec-support.
It took a lot longer than anticipated but I finally managed to fix (hopefully) the template ID generation.
@nkutsche, if you feel lucky, you can update to the new version :) . If you go to Help->Check for addons updates... you should be able to install the new version. The new version is available at the same update site:
https://raw.githubusercontent.com/xspec/oXygen-XML-editor-xspec-support/master/build/update_site.xml
from oxygen-xml-editor-xspec-support.
Hi Alex,
thanks for the fix! I definitly will update it after my vacation.
Best Regards,
Nico
from oxygen-xml-editor-xspec-support.
Related Issues (20)
- XML Diff Viewer with capitals in element names HOT 1
- "XSpec Run" doesn't work on Mac OS X. and this is a patch. HOT 1
- Basic XSLT 3.0 isn't working in XSpec but is in Oxygen. HOT 3
- XSLT error results in empty pane HOT 4
- Diff action shows a "/" in first line HOT 7
- oXygen 20.1: XSpec transformation scenario fails HOT 1
- Running a Schematron test from the view shows no results
- x:expect in xspec HOT 3
- Property xspec.template.name.entrypoint was circularly defined on oXygen 21.1 HOT 2
- testing maps HOT 4
- Type error of $params in generate-xspec-tests-oxygen.xsl
- unable to validate xspec file HOT 1
- Version 1.6.0? HOT 1
- Failing an attribute scenario generates error in unit-report-oxygen.xsl HOT 1
- processing terminated by xsl:message while atomizing the value of variable $successful HOT 3
- Release version 2.1.4
- Show transform log
- "XPath ... from" is missing
- Not compatible with oXygen 26 HOT 1
- "Show" doesn't always work correctly for Schematron x:expect-* elements HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oxygen-xml-editor-xspec-support.