Huma Posted March 16, 2006 Share Posted March 16, 2006 DEAR ALL,I WANT TO USE FOLLOWING SCHEMA FILE <?xml version="1.0" encoding="UTF-8" ?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.com" xmlns="http://www.example.com"> <!-- global element declaration validates <language> elements from http://www.example.com namespace --> <xs:element name="language" type="xs:string" /> <xs:element name="Root" type="sequenceOfLanguages" /> <xs:element name="Root2" type="sequenceOfLanguages2" /> <!-- complex type with local element declaration validates <language> elements without a namespace name --> <xs:complexType name="sequenceOfLanguages" > <xs:sequence> <xs:element name="language" type="xs:NMTOKEN" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> <!-- complex type with reference to global element declaration --> <xs:complexType name="sequenceOfLanguages2" > <xs:sequence> <xs:element ref="language" maxOccurs="10" /> </xs:sequence> </xs:complexType></xs:schema>WITH THIS XML FILE.<?xml version="1.0"?><ex:Root xmlns:ex="http://www.example.com"> <language>EN</language> </ex:Root> BUT IT IS NOT WORKING.I AM NOT GETTING THE CONCEPT OF LOCAL AND GLOBAL ELEMENTS IN SCHEMA.CAN ANYBODY HELP ME?BEST REGARDSHUMA Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now