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.
Comments:

Chris,

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 06:30 AM PDT #

There is no way to change the name of the element, without creating an element based on the underlying type. It doesn't sound like substitution groups are appropriate for what you are doing as well (which are not recommended by some anyway).

Posted by guest on May 24, 2006 at 10:53 AM PDT #

Chris, the link to the video is broken (404) Regards, David

Posted by David Coldrick on June 01, 2006 at 03:41 PM PDT #

Post a Comment:
Comments are closed for this entry.
About

cwebster

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today