Is this a Content Node or Not ?

Hello,
I have an xs:string node in my Schema and its minOccurs=0,maxOccurs=1.
In xapplication (in one of my tags which extends JspTag) I get this node from BusinessDocument with the getChild() method.
When I call the isContentNode() method of this node it returns False !!!
But I think it should return True.
Am I right or not ?

myMD = sessionContext.getDocument(“currentHasta”);

BusinessNode bd=null;
BusinessNode tempNode =null;

bd = myMD.getDescendant("/Hasta/Vaka[0]");
for (int k=0;k<bd.getChild(0).getChildCount();k++) {
tempNode = bd.getChild(0).getChild(k);
if(tempNode.isContentNode) {
System.out.println("This Node is content Node…: " + tempNode.toXML() );
}
}

Hello MehmetServer,

to address your problem thoroughly we need to have the corresponding schema defintion. Please attach it to a new reply.

Thank you for your contribution

Stefan Schwalm
Software AG, Darmstadt

I suppose that getChild(k) returns a structure node (OccurrenceNode, ChoiceNode or SequenceNode)and the node you want to check with isContentNode is a child of the structure node.

What do you get if you insert a
System.println("" + getChild(k).getClass())
into you loop?


Michael

Software AG Germany, Darmstadt