Get Beginning XML with DOM and Ajax: From Novice to Professional PDF

. • A comment may not be included within tag names. • A comment should not hide either the opening or closing tags in an element. • An XML processor isn’t obliged to pass a comment to an application, although most do. DTDs and XML Schemas DTDs and XML schemas provide rules about which elements and attributes can appear within the XML document.

In XHTML pages, the text that you wish to style is character data. With XML, that might not be the case. For example, the content might consist of numeric data that a human can’t easily interpret visually. When working in CSS, it’s not easy to add explanatory text when rendering the XML document. This limitation might not be important when you’re working with documents that contain only text, but it might be a big consideration when you’re working with other types of content. Another limitation of CSS is that it mostly renders elements in the order in which they appear in the XML document.

Schemas and Namespaces The subject of XML schemas is so complex that it could take up an entire book. For now, let’s discuss the relationship between schemas and namespaces. When defining a schema, it’s possible to define the namespace within which an instance document must reside. You do this by using the targetNamespace attribute of the element. If you do this, any reference to these elements within the schema must also use this namespace. It avoids complications if you define this as the default namespace of the XML schema.

Download PDF sample

Beginning XML with DOM and Ajax: From Novice to Professional by Sas Jacobs


by Daniel
4.2

Rated 4.01 of 5 – based on 8 votes