13.07.2015 Views

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The next step is to def<strong>in</strong>e a new schema <strong>for</strong> a type named EuAddressType . You usethe <strong>in</strong>clude tag to import the exist<strong>in</strong>g address construct from the base type declaration,as shown <strong>in</strong> the follow<strong>in</strong>g code:At this po<strong>in</strong>t, you can declare the global element that, of course, will be of the newEuAddressType type, as follows:Us<strong>in</strong>g the orig<strong>in</strong>al xaddress.xsd schema (with a global element of type AddressType)raises a conflict because the address tag would be repeated. The f<strong>in</strong>al step is to def<strong>in</strong>ethe extensions (or the restrictions) that characterize the new type. You use theextension tag or the restriction tag as needed. The follow<strong>in</strong>g code adds a str<strong>in</strong>g element to the def<strong>in</strong>ition:94

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!