This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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.