Installing Microsoft XML Tools

Installing Microsoft XML Tools

APPENDIX A Installing Microsoft XML Tools MICROSOFT MAKES AVAILABLE its Internet Explorer Tools for Validating XML and Viewing XSLT output. Installing IE Tools for Validating XML Documents You can download IE Tools from http://msdn.microsoft . coml downloadsl as shown in Figure A-I. IJ XIII. ,., ANlyflt SOlI mI11'II.'" __ SQI. SO,..r lOGO w.~ RoIo ... ~ lOW ~ (·"to"flbOt l'II,,"v, IA....... (JUo\l.) If ~ YfIIVtrMI flllf'TMt tor dill on 1ItI. G:I_3.o . "IIIe"_~ocbv· Ql«III.SOICV ..1on2 ____ WI'b. MML ....,.. d..... lopoH'l ltD ....tty dMa'lbD end deb",.". rim • • t:nH:D.rM IiIMIII.V.iIIItIIOfITooi dttl "om .., r ..,plk»'bon ..... IUInCItrd, CI04')1 4t1ltf11t _ .. , . ML d"J not IiIltmliMt.exo ............ Tool ,""IIOt Kl'MI., r~' , .. K, IilMS_Z.sSPl oomp rntOW'Y fOl1'\f\. mlCS_ 'on.. t.a SO""" Pod< 1 ....... a ICbM.. ) .. It ..., loc.t1bacI W."''''f QIC$_ 3.oSPl M~ • ..,._ ~o<k_ QMS_ '1ft .. U .010_ iii "1IlIfTTP ~xy co.iIour_ UIHi<y GlICSl. Figure A -1. Downloading the IE tools The file to download is iexmltls.exe. Upon running the iexmltls.exe file, the program will prompt you to install the files into a folder. The default folder is: c:\iexmltls. 393 Appendix A You'll find the following files and folder in this folder: • Msxrnlval.htm • Msxmlval.inf • Msxmlvw.htm • Msxrnlvw.inf • Readme. txt • IE XML (folder) To install the validating tools, right -click on the two .inf files and select Install, as shown in Figure A-2. SelUl) It101~lon HTML OONnel'll .....al.n Setup Inlorllllltion Seb41lnlannabon TeocI Oocunenl MocfIiect 2J412<XXl 1:14 PM Size: 1.081(.8 ~ : (ncIIIMIJ Figure A-2. Installing the IE tools To use the tools, be sure to restart Internet Explorer. 394 Installing Microsoft XML Tools Checking the Version of the Installed XML Parser Before trying out the examples in this book, it is important to ensure that you have installed the MicrosoftXML Parser (version 3 or above). As most computers running the Microsoft Windows Operating System come preinstalled with the older XML parser (version 2.x), most examples in this book will fail to work if the latest parser is not installed. The easiest way to ensure that you have the required parser is to download the latest parser from Microsoft's Web site (http://msdn.microsoft . com/xml) and install it on your machine. Alternatively, if you want to check out the version number of the parsers that are installed on your system, Microsoft provides an XML version checker. The XML version checker can be downloaded from http://support.microsoft.com/support/kb/articles/q278/61 74.asp?id=278674&SD=MSKB. Alternatively, look for the knowledge base article ID: Q278674. The file to download is Xmlversion.exe. Installing the XML Version Checker To install the XML version checker, simply double-click on the file that you downloaded and select a directory to which you want to extract the files. The extracted files are • Register.bat • Unregister.bat • Xmlversion.htm • Xmlversions.ocx 395 Appendix A To use the XML version checker, launch the Xmlversion.htm document using Internet Explorer, as shown in Figure A-3. ProgIDs Figure A -3. Using the XML version checker In Figure A-3, you can see that XML parser versions 2.6 through 4.0 are installed on my computer. You'll also notice the ProgIDs that are supported by the various versions of the XML parsers. ProgIDs Modes In the XML parser 3.0, you have the option to install the parser in two modes: • Side-by-side • Replace Mode 396 Installing Microsoft XML Tools Installing the parser in side-by-side mode allows you to maintain your existing applications (using the older MSXML.dll or MSXML2.dll). To make use of the new XML parser, you need to use the version dependent ProgID as shown in Table A-I. Table A -1. Version Dependent and Independent ProgIDs VERSION DEPENDENT PROGID VERSION INDEPENDENT PROGID MsxmI2.DOMDocument.3.0 Msxml2.DOMDocument MsxmI2.FreeThreadedDOMDocument.3.0 Msxml2.FreeThreadedDOMDocument MsxmI2.DSOContro1.3.0 Msxml2.DSOControl MsxmI2JCMLHTTP.3.0 Msxml2.xMLHTTP MsxmI2.xMLSchemaCache.3.0 Msxml2JCMLSchemaCache MsxmI2.xSLTemplate.3.0 Msxml2.xSLTemplate MsxmI2.SAXAttributes.3.0 Msxml2.SAXAttributes MsxmI2.SAXXMLReader.3.0 Msxml2.SAXXMLReader Msxm12.MXXMLWriter.3.0 Msxml2.MXXMLWriter MsxmI2.MXHTMLWriter.3.0 Msxml2.MXHTMLWriter If you install the XML parser in replace mode, be sure to check that it does not break existing applications that are using the older ProgIDs. In this case, you can now use the version independent ProgID. 397 APPENDIX B Document Object Model (DOM) Level 1 Core Interfaces THIS APPENDIX SUMMARIZES the fundamental and extended interfaces ofDOM Levell Core that are used in Chapter 4 of this book. You can find more detailed documentation at http://www.w3.org/TR/REC-DOM-Level-l/. Understanding Basic Terms in the DOM Before we present the exception and various interfaces ofthe DOM Levell Core specifications, we want to clearly define the basic terms that are used in the spec­ ification and explanations. The basic terms are interface, exception, object, as well as the DOMString type. Interface) Exception) Object We will first define the three basic terms: interface, exception, and object. Since DOMString is of a different category, basically a data type used in the DOM ter­ minology, we will define it in the next subsection. The DOM Levell specifies the interfaces as well as one exception. The purpose of an interface specification is to lay down the properties and methods that an interface contains and exposes. There is no dictation of how the properties' values should be obtained or how the methods should be imple­ mented. There is only one special case, where an exception specification is used instead of an interface. An exception specification may be viewed as a special interface specification, that is, specifically used for exceptions. An instance of an exception (e.g., DOMException) or an interface (e.g., Document) is called an object. 399 AppendixB The DOMString Type A DOMString is a sequence of 16-bit characters. Applications must encode DOMString using UTF-16. In some platforms, DOMString is bound to some native data type. For example, in Java, DOMString is bound to the String type as the latter also uses UTF -16 as its encoding. In this appendix, the word "string" is used interchangeably with "DOMString." Fundamental Interfaces All implementations of DOM must fully support all the fundamental interfaces that are listed in this section. DOMException An exception is raised when a DOM operation encounters some abnormal or exceptional situation. Each exceptional situation is assigned a unique code (Table B-l). Table B-1. DOMException Property PROPERTY/ATTRIBUTE DESCRIPTION code A number of the short integer data type. It is a unique code to indicate the type of error or exceptional case occurring. The following constant code values in Table B-2 have been defined: 400 Document Object Model (DaM) Levell Core Interfaces Table B-2. Constant Code Values for DOMException CODE VALUE DESCRIPTION OF ASSOCIATED ERROR INDEX_SIZE_ERR (1) Index or size is negative, or greater than the allowed value Specified range of text does not fit into a DOMString A node is inserted somewhere it does not belong A node is used in a different document than the one that created it and the document does not support it INVALID_CHARACTER_ERR (5) An invalid character is specified, such as in a name Data specified for a node that does not support data NO_MODIFlCATION_ALLOWED_ERR (7) An attempt is made to modify an object where modification is not allowed An attempt is made to reference a node in a context where it does not exist The implementation does not support the type of object requested An attempt is made to add an attribute that is already in use elsewhere DOMlmplementation The method (Table B-3) that is provided in this interface does not apply to spe­ cific document instances, but rather to all documents from the particular DOM implementation. 401 AppendixB Table B-3. DOMImplementation Method METHOD FUNCTION has Feature (feature, version) Tests if a DOMImplementation implements a specified feature, feature (e.g., HTML and XML), where version indicates the version of the feature to be tested. This method returns true if the specified feature is implemented and false otherwise. DocumentFragment A DocumentFragment object is a lightweight Document object that is commonly used to represent a portion of a containing document. It is used to extract a group of nodes from a document's tree or to create a group of nodes with the intent of joining them to the containing document (Document object) at a later point in time. This interface extends the Node interface with no additional properties and methods. Document The Document interface represents an HTML or XML document. It is the root of a document tree that provides the top-most level access to the document's data. The Document interface extends the Node interface. It contains additional properties and methods listed in Table B-4 and Table B-S. The term this docu­ ment as used in Table B-4 and Table B-5 refers to the document in question, whose properties and methods are being discussed. Table B-4. Extended Properties in Document Interface PROPERTY/ATTRIBUTE DESCRIPTION doctype The Document Type Declaration associated with this document. The value has an interface type of DocumentType. If the document does not have a Document Type Declaration, this property has the value NULL. implementation The Documentlmplementation object that handles this document in question. documentElement The root element for this document. 402 Document Object Model (DaM) Levell Core Interfaces A Document will contain different types of nodes such as element and text nodes.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    61 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us