|
XML and ASP. NET Authors: Evans K. A., Kamanna A., Mueller J. Published year: 2005 Pages: 35-38/184 |
| only for RuBoard |
In this chapter, you saw that schemas are an elegant way of validating XML instance documents. Instead of leaving developers to their own means to validate the data in an XML document, an XSD Schema can be applied to the XML instance document to validate the data if the XML document conforms to the rules agreed upon in the schema. You can validate the presence of elements and attributes, the order of elements, the cardinality of elements, and the number of times that an element can occur. You also saw how to define your types and extend those types to be used throughout your document.
You also saw that the .NET Framework classes provide access to read the structure of an XSD Schema and to programmatically create an XSD Schema. Using these classes, you can easily imagine creating a tool to display schemas graphically or to edit schemas through a utility.
Finally, you were introduced to the concept of readers and writers within the .NET Framework base classes. You used XmlValidatingReader to validate an XML document against a specified schema. Lastly, you saw how the ValidationEventHandler delegate event determines if an error occurred with the validation process.
| only for RuBoard |
| only for RuBoard |
Introduction to DataSets. MSDN Help, ms-help://MS.VSCC/MS.MSDNVS/vbcon/html/vbconDataSets.htm .
Holzner, Steven. Inside XML . New Riders Publishing Indianapolis, IN 2001. ISBN: 0-73571-020-1.
| only for RuBoard |
| only for RuBoard |
Xml is a great tool for working with and structuring data. So far, this book has focused on the data. Chapter 1, "XML and ASP.NET: The Basics," showed you the basics of creating a well- formed document and gave you some practical uses for XML. Chapter 2, "XML Schemas in .NET," showed you how you can use XML to convey and validate the structure of an XML document. It also showed you why validating the data can be important. This chapter shows you some of the different mechanisms that exist for displaying data, including data islands, XML data source objects, Cascading Style Sheets (CSS), and Extensible Stylesheet Language Transformations (XSLT). You also look at Wireless Application Protocol (WAP) and Wireless Markup Language (WML) for working with a variety of devices. Finally, the benefits, tradeoffs, and differences between declarative programming with XSLT and processing information with Active Server Pages (ASP) are dicussed.
| only for RuBoard |
| only for RuBoard |
Before looking at the concepts and code for XML, you first need to understand what browsers you are targeting for different uses. XML has only gained widespread acceptance in the past several years , and tool support reflects this. Older versions of both the Netscape Navigator and Microsoft Internet Explorer browsers have limited, if any, support for XML or related technologies. Internet Explorer 5.5 is the first browser to support the XSLT 1.0 Recommendation.Version 5.0 supported an earlier working draft of the Extensible Stylesheet Language (XSL) working draft. Netscape 6.0 is the first Netscape browser to support XML, XSLT, and XML Schemas. Table 3.1 lists the compatibilities for different browser versions.
|
Browser |
Version |
XML 1.0 |
XSL |
XSLT |
XDR |
XSD |
Data Islands |
|---|---|---|---|---|---|---|---|
|
Netscape |
4.0 |
||||||
|
4.5 |
|||||||
|
6.0 |
X |
X |
X |
X |
|||
|
Internet Explorer |
5.0 |
X |
X |
||||
|
5.5 |
X |
X |
X |
X |
|||
|
6.0 |
X |
X |
X |
X |
X |
X |
|
| only for RuBoard |
|
XML and ASP. NET Authors: Evans K. A., Kamanna A., Mueller J. Published year: 2005 Pages: 35-38/184 |