Hi again,
as you may suppose for my previous posts, I'm working with the
xhtml.ecore metamodel. That is, I'm trying to generate some xhmtl from
my source metamodel.
The problem comes when I try to assign a value for the class
attribute of the li type. The xhtml code I'm trying to obtain is
something similar to the following one:
<LI>
<A CLASS="active" TITLE="News" HREF="./1-news.html"> News</A>
</LI>
For that, I have written the following constructor:
constructor xhtml::LiType::LiType(current: siteMap::Node,
iter:siteMap::Node){
a += object xhtml::AType {
_class += 'active';
href:='./'+iter.fullFileName();
title:=guardTexts(iter.label, iter.name);
text:= title;
};
}
The error is in the line _class+='active'. class has been defined as a
NMTOKENS datatype. And this datatype has been defined having as a base
the java.util.List. I suppose the problem is the syntax, so my concrete
question is how can I assign the active value to the attribute class in
this case?
Thanks in advance,
Toñi