Page 350 - Open Soource Technologies 304.indd
P. 350
Web Technologies-I
Notes 13.7 Summary
• XML specifies neither semantics nor a tag set. In fact XML is really a meta-language for
describing markup languages.
• SGML is the Standard Generalized Markup Language defined by ISO 8879. SGML has
been the standard, vendor-independent way to maintain repositories of structured
documentation for more than a decade, but it is not well suited to serving documents
over the web.
• Defining XML as an application profile of SGML means that any fully conformant SGML
system will be able to read XML documents. However, using and understanding XML
documents, it does not require a system that is capable of understanding the full generality
of SGML. XML is, roughly speaking, a restricted form of SGML.
• SGML provides arbitrary structure, but is too difficult to implement just for a web browser.
Full SGML systems solve large, complex problems that justify their expense. Viewing
structured documents sent over the web rarely carries such justification.
• XML documents generally are not completely ad hoc. The specific tags, attributes, and
entities in an XML document, and the rules governing how they nest, comprise the structure
of the document.
• PHP’s XML parser is event-based, meaning that as the parser reads the document, and it
calls various handler functions you provide as certain events occur, such as the beginning
or end of an element.
• The XML parser used by PHP supports Unicode data in a number of different character
encodings. Internally, PHP’s strings are always encoded in UTF-8, but documents parsed
by the XML parser can be in ISO-8859-1, US-ASCII, or UTF-8. UTF-16 is not supported.
• Because functions and variables are global in PHP, any component of an application that
requires several functions and variables is a candidate for object orientation.
• PHP’s XSLT support is still experimental at the time of writing, and the exact implementation
details may change from what is described here. However, this description should give
you a good foundation for how to use PHP’s XSLT functions, even if the implementation
changes in the future.
13.8 Keywords
Character data handler: The character data handler takes in a reference to the XML parser that
triggered the handler and a string containing the character data itself.
Markup language: A markup language is a mechanism to identify structures in a document.
The XML specification defines a standard way to add markup to documents.
Processing instructions: Processing instructions are used in XML to embed scripts or other code
into a document.
XML: XML is a markup language for documents containing structured information.
XSLT: Extensible Stylesheet Language Transformations (XSLT) is a language for transforming
XML documents into different XML, HTML, or any other format.
344 LOVELY PROFESSIONAL UNIVERSITY