Re: Issue 59 in xspec: xspec produces a different transformation than expected

7 views
Skip to first unread message

xs...@googlecode.com

unread,
Aug 13, 2013, 6:36:26 PM8/13/13
to xspe...@googlegroups.com

Comment #1 on issue 59 by vpereto...@gmail.com: xspec produces a different
transformation than expected
http://code.google.com/p/xspec/issues/detail?id=59

One thing I realized is that I was expecting all of my templates (starting
from the main driving one) to run it - which seemed like they all did, but
certain ones have failed to work.

I've since setup a case where I feed it a document and a selected location,
and then feed that to a select template - and that processed it right...
but this case is still eluding me.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

xs...@googlecode.com

unread,
Aug 14, 2013, 11:26:22 AM8/14/13
to xspe...@googlegroups.com

Comment #2 on issue 59 by fgeor...@gmail.com: xspec produces a different
Issue 60 has been merged into this issue.

xs...@googlecode.com

unread,
Aug 14, 2013, 11:31:04 AM8/14/13
to xspe...@googlegroups.com

Comment #3 on issue 59 by fgeor...@gmail.com: xspec produces a different
Any chance that you could send a complete example? (like the test suite,
the stylesheet and the input file) Ideally minimized to a short one...

xs...@googlecode.com

unread,
Aug 14, 2013, 7:57:01 PM8/14/13
to xspe...@googlegroups.com

Comment #4 on issue 59 by vpereto...@gmail.com: xspec produces a different
Yes certainly - here is a minimized test case.

This is what I get with it - it also seems to bug out internally, but from
the xsl:message, you can tell that the name isn't being made right anyway:

PS C:\Users\VadimPeretokin\Desktop\dcm2ea>
C:\Tools\xspec-0.4.0rc1\bin\xspec.bat .\DCM2EA.xspec
Creating Test Stylesheet...
"C:\Users\VadimPeretokin\Desktop\dcm2ea\xspec\DCM2EA.xsl"
.\DCM2EA.xspec

Running Tests...
Testing with SAXON HE 9.4.0.9
Cut-down test to see the $packagename
The package name is: v draft
Package name should be properly formed
Error on line 66 of DCM2EA.xsl:
XPDY0050: The root of the tree containing the context item is not a
document node
Transformation failed: Run-time errors were reported

Formatting Report...
Error on line 1 column 1 of DCM2EA-result.xml:
SXXP0003: Error reported by XML parser: Premature end of file.
Transformation failed: Run-time errors were reported
Done.
PS C:\Users\VadimPeretokin\Desktop\dcm2ea>

If you run the xsl on the source sample file, you'll get this result:

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmlns:uml="http://www.omg.org/spec/UML/20101101"
xmlns:xmi="http://www.omg.org/spec/XMI/20101101"
xmi:version="2.4">
<xmi:Documentation exporter="Enterprise Architect"
exporterVersion="6.5"/>
<uml:Model xmi:type="uml:Model" name="DCM Model" visibility="public">
<packagedElement xmi:type="uml:Package"
xmi:id="d1e3"
name="Adverse Reaction v5.1 draft 72"
visibility="public"/>
</uml:Model>
</xmi:XMI>

Which is obviously different than from what xspec produces when it runs the
transformation.

Saxon-HE is used in all cases here as the transformer.

Attachments:
xspec - bad attribute name.zip 2.6 KB

xs...@googlecode.com

unread,
Aug 18, 2013, 11:48:34 PM8/18/13
to xspe...@googlegroups.com

Comment #5 on issue 59 by vpereto...@gmail.com: xspec produces a different
Is any other information needed for this? I'm hoping I'm just doing
something wrong, as this issue really affects the usability of xspec.

xs...@googlecode.com

unread,
Aug 20, 2013, 7:43:43 PM8/20/13
to xspe...@googlegroups.com

Comment #6 on issue 59 by vpereto...@gmail.com: xspec produces a different
THe error doesn't seem to be relevant and seems to happen due to some xslt
limitation - replacing /xmi:XMI with descendant-or-self:: fixes the error,
yet the issue of the invalid variable text being generated is still there.

xs...@googlecode.com

unread,
Aug 20, 2013, 11:07:19 PM8/20/13
to xspe...@googlegroups.com

Comment #7 on issue 59 by vpereto...@gmail.com: xspec produces a different
Doing some more digging on this and solved the problem. The base-uri() of
variables declared the top level element, not in a template, is wrong:
it'll be set to the xspec file. That's why global variables can't select
anything right... and thus can't be used within xspec really.

Is there any possible solution to this?

xs...@googlecode.com

unread,
Sep 28, 2013, 4:17:13 PM9/28/13
to xspe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages