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 14:27 Go to next message
mauro is currently offline mauro
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 17:34 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25919
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?
>
Previous Topic:append to an existing file using ws:file
Next Topic:MTL & GMF
Goto Forum:
  


Current Time: Fri Jul 25 12:02:24 EDT 2014

Powered by FUDForum. Page generated in 0.02546 seconds