This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
In the above schema declaration I would like to add an attribute called "nickName" to "firstName" child element of "name" element. Also the firstName should have only text characters within it. NO element is allowed.
How to declare this requirement in schema. I would also like to know whether this is possible. Bacause I tried with complexType declaration like
"Element 'firstName' cannot have both a type attribute and a simpleType/complexType type child"
After removing the "type" attribute I still got error
"No character data is allowed by content model"
By making use of "mixed" attribute set to "true" in "complexType" I can rectify this error. But that would allow child element declarations within "firstName" element. But I only want character data to be present within it.