[xsde-users] XSD/e 3.2.0 - Getting g1 prefix on elements - why?

Jonathan Haws Jonathan.Haws at sdl.usu.edu
Wed Apr 10 14:52:57 EDT 2013


All,

I tried to pare this down to the basics to leave out stuff that is meaningless to the problem.  Let me know if more detail is needed.

I am getting output that looks like this:

<g1:data xmlns:g1="http://mywebsite" platform="test" processor="test" other="test">
  <g1:gps>
    <location>
      <g2:latitude xmlns:g2="http://someotherwebsite">41.5</latitude>
      <g2:longitude xmlns:g2=" http://someotherwebsite ">-111.5</longitude>
    </location>
    <g1:list></g1:list>
  </g1:gps>
</g1:data>

How can I get rid of the 'g1' prefix?  I want the g1 prefix to be say "myxml".  The 'g2' I would like to be "mygps".

The schema definitions look similar to this:

Data.xsd - defines "myxml" namespace; imports gps.xsd which defines the "mygps" namespace (as well as others that I am not serializing elements for) and imports a schema called schema.xsd.

To produce the parser and serializer code, I used the following commands:

C:\xsde\bin\xsde cxx-hybrid --generate-inline --generate-parser --generate-serializer --generate-aggregate --namespace-map "http://mywebsite=myxml" --namespace-map "http://someotherwebsite=mygps" --location-map " http://someotherwebsite /gps.xsd=gps.xsd" --location-map " http://yetanotherwebsite/schema.xsd=schema.xsd" --root-element data --no-long-long xsd/data.xsd

C:\xsde\bin\xsde cxx-hybrid --generate-inline --generate-parser --generate-serializer --generate-aggregate --namespace-map " http://someotherwebsite =mygps" --location-map "http://yetanotherwebsite/schema.xsd=schema.xsd" --no-long-long --reserved-name near=gpsnear xsd/gps.xsd

What can I do to get the right namespace names?

Thanks!
Jonathan




More information about the xsde-users mailing list