• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

converting DTD to schema

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,

Iam trying to convert a DTD into schema in XmlSpy. This DTD has very many namespaces. So it is complaining :

Schema error: name="cd:type" cannot have a namespace prefix, please remove prefix or use ref=instead

What does this error mean? Schema can have namespaces...right? Could anyone tell me how to fix this error? I tried taking out this complex type completely, still it is giving the same error in the next complex type. Do I have to give the path of the namespaces somewhere in the DTD/Schema?

Your help is greatly appreciated.

Thanks.
Swapna
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Swapna,

The value of the name must be a non-colonized XML name. That's the error you are gettimg. Yes, schemas can have namespaces. The element declarations in a schema file are in the namespace specified by the targetNamespace declaration.

In your declaration, your intent is not clear. If your intention is to declare an element with name 'type' and that this element belong to the 'cd' namespace, then you should use a different solution. OTOH, if your intention is to declare an element which is of the same type as another element 'cd:type' that is defined elsewhere then you should use the ref attribute. Here 'cd' represents a namespace.

If you could clarify what your intent is, we could discuss more.

- m
reply
    Bookmark Topic Watch Topic
  • New Topic