Chris Webster's Weblog
Netbeans Enterprise Pack XML Tools Video
The NetBeans Enterprise Pack has a video outlining the XML tools suite. Take a look at http://developers.sun.com/prodtech/javatools/jsenterprise/tpr/reference/presentations/xmltools/xmltools.htm.Posted at 07:34PM May 11, 2006 by Christopher Webster in Netbeans | Comments[3]
Thursday May 11, 2006
This comment has nothing to do with your last blog entry, but unfortunately I did not find another way to contact you. I hope I won’t cause too much trouble by posting my question here.
I’ve recently read your articles on XML Namespaces (Namespaces in XML Schemas, Part 2 of Two-Part Series) and I thought you might have an insight to the following problem:
I’d like to create a reusable xml schema for a ‘Location’ type and element which would have its own namespace (e.g. Location.xsd). Now I would like to reference the Location element in other schemas and I want it to keep the original namespace. So I am referencing an element (not type).
Here is the problem. I might have two or more Location elements in other schemas. For example, I might need to create StartLocation and EndLocation elements. However, when I am referencing the Location element from the Location.xsd I cannot change the name of that element. So I will end up with two elements having the same name - <Location>. Obviously, had I known that I would need StartLocation and EndLocation elements in other schemas I would have defined them in my Location.xsd. However, this approach only goes that far. For example, I might have no control over the Location.xsd (e.g. it comes from the third party) or what if someone down the road would have to create MiddelLocation, WareHouse, HomeLocation and ect. elements? I can’t define all of them in the Location.xsd.
Alright, I guess all this boils down to this question: When referencing the element from the imported xsd schema, is it possible to change that element name in the importing xml schema?
Thank you,
Dima Maltsev
Posted by Dima Maltsev on May 16, 2006 at 01:30 PM PDT #
Posted by 192.18.42.249 on May 24, 2006 at 05:53 PM PDT #
Posted by David Coldrick on June 01, 2006 at 10:41 PM PDT #