Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [bug?] problem with xsi:nil
[bug?] problem with xsi:nil [message #54936] Thu, 08 January 2009 19:27 Go to next message
mauro is currently offline mauroFriend
Messages: 9
Registered: July 2009
Junior Member
I think I hit a strange bug... using the transformation
<c:get select="/name" />

on
<name xsi:nil="true" />

I get the error:
templates/main.jet(1,1): <c:get select="/name">
Error: XPath expression returned no result

while it works for any other namespace/attribute:
<name any:nil="true" />
<name xsi:any="true" />
<name nil="true" />
<name any="true" />

any idea on the reason why?
Re: [bug?] problem with xsi:nil [message #54963 is a reply to message #54936] Thu, 08 January 2009 22:34 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Mauro,

I imagine that's because xsi:nil and xsi:type have special "meta
meaning" in the XML instance and hence aren't treated like any other
attribute. The <name xsi:nil="true"/> will be treated as if the name
were set to null, which would look the same as there being no name at
all. Likely that's the root of the issue...


mauro wrote:
> I think I hit a strange bug... using the transformation
> <c:get select="/name" />
>
> on
> <name xsi:nil="true" />
>
> I get the error:
> templates/main.jet(1,1): <c:get select="/name">
> Error: XPath expression returned no result
>
> while it works for any other namespace/attribute:
> <name any:nil="true" />
> <name xsi:any="true" />
> <name nil="true" />
> <name any="true" />
>
> any idea on the reason why?
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:append to an existing file using ws:file
Next Topic:MTL & GMF
Goto Forum:
  


Current Time: Thu Apr 25 15:01:09 GMT 2024

Powered by FUDForum. Page generated in 0.02793 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top