Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Creating XSDAnnotations
Creating XSDAnnotations [message #582997] Mon, 19 January 2004 17:05
Eclipse UserFriend
Originally posted by: floodg.uk.ibm.com

Hi,

trying to create an XSDAnnotation for an XSDFacet. Can't understand why the
following code doesn't do the job!

XSDAnnotation annotation = XSDFactory.eINSTANCE.createXSDAnnotation();

facet.setAnnotation(annotation);

Element element =
annotation.createUserInformation(facet.getSchema().getSchema Location());

Node node = element.getOwnerDocument().createTextNode("some text");

element.appendChild(node);

annotation.getUserInformation().add(element);

I've also tried element.setNodeValue("some text") but that doesn't work
either. My output contains no annotation node at all.

And ideas or sample code would be greatly appreciated!

Gary.
Previous Topic:Possible errors in the XSD facet item providers
Next Topic:finding elements or attributes based on Types
Goto Forum:
  


Current Time: Fri Apr 26 08:51:15 GMT 2024

Powered by FUDForum. Page generated in 0.03078 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top