Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

inclusion of xml:lang

 
ashwin vulugundam
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am having xyz.xml which is validated against xyz.xsd

xyz.xml looks like this

<CATALOGUE>
........
</CATALOGUE>

Now if i want to introduce xml:lang="fr-CA" indicating that xml is in canadian french
Now the xml looks like this
<CATALOGUE xml:lang="fr-CA">
....
</CATALOGUE>

What changes i need to make in the xsd to incorporate this change
 
g tsuji
Ranch Hand
Posts: 666
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>What changes i need to make in the xsd to incorporate this change
I hope this is not a riddle or pure mental exercise. Why don't you go ahead with the xsd unchanged? Have you encountered something wrong during validation?
 
ashwin vulugundam
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ,
thanks for the reply.
well i got the solution for the issue.

Need to add namspaces to the XSD.
just add the following
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd" />

 
g tsuji
Ranch Hand
Posts: 666
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I don't think so. But there are all sorts of validating parsers out there. If your validating parser really needs that, putting an xs:import would certainly not sufficient to validate the xml document, not at all. But I see somebody vote for your "answer", so somebody (and possibly many more) must think you're right - count me out though. I leave you enjoy tje popular votes then.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic