user manual and programmers' reference4 altova xmlspy 2008 professional edition –xml tables........

1034
User Manual and Programmers' Reference

Upload: others

Post on 19-Jun-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

  • User Manual and Programmers' Reference

  • All rights reserved. No parts of this work may be reproduced in any form or by any means- graphic, electronic, or mechanical, including photocopying, recording, taping, orinformation storage and retrieval systems - without the written permission of the publisher.

    Products that are referred to in this document may be either trademarks and/or registeredtrademarks of the respective owners. The publisher and the author make no claim tothese trademarks.

    While every precaution has been taken in the preparation of this document, the publisherand the author assume no responsibility for errors or omissions, or for damages resultingfrom the use of information contained in this document or from the use of programs andsource code that may accompany it. In no event shall the publisher and the author beliable for any loss of profit or any other commercial damage caused or alleged to havebeen caused directly or indirectly by this document.

    Published: 2008

    © 2008 Altova GmbH

    Altova XMLSpy 2008 Professional Edition User &Reference Manual

  • Altova XMLSpy 2008 Professional Edition 1

    Table of Contents

    Welcome to XMLSpy Professional Edition 3

    User Manual 6

    71 Introduction

    .........................................................................................................................................8Altova's XML Products 1.1.........................................................................................................................................10XMLSpy's Main Features 1.2.........................................................................................................................................13User Interface 1.3

    ............................................................................................................................14Project Window1.3.1

    ............................................................................................................................15Info Window1.3.2

    ............................................................................................................................15Main Window1.3.3

    ............................................................................................................................16Entry Helpers1.3.4

    ............................................................................................................................16XSL Outline Window1.3.5

    ............................................................................................................................17Output Windows1.3.6

    ............................................................................................................................18Menu Bar and Toolbar1.3.7

    192 Tutorials

    .........................................................................................................................................20XMLSpy Tutorial 2.1............................................................................................................................20XMLSpy Interface2.1.1

    ............................................................................................................................21XML Schemas: Basics2.1.2

    ............................................................................................................................ 22Creating a New XML Schema File–

    ............................................................................................................................ 25Defining Namespaces–

    ............................................................................................................................ 26Defining a Content Model–

    ............................................................................................................................ 30Adding Elements with Drag-and-Drop–

    ............................................................................................................................ 31Configuring the Content Model View–

    ............................................................................................................................ 33Completing the Basic Schema–

    ............................................................................................................................36XML Schemas: Advanced2.1.3

    ............................................................................................................................ 36Working with Complex Types and Simple Types–

    ............................................................................................................................ 44Referencing Global Elements–

    ............................................................................................................................ 46Attributes and Attribute Enumerations–

    ............................................................................................................................49XML Schemas: XMLSpy Features2.1.4

    ............................................................................................................................ 49Schema Navigation–

  • 2 Altova XMLSpy 2008 Professional Edition

    ............................................................................................................................ 51Schema Documentation–

    ............................................................................................................................54XML Documents2.1.5

    ............................................................................................................................ 55Creating a New XML File–

    ............................................................................................................................ 57Specifying the Type of an Element–

    ............................................................................................................................ 59Entering Data in Grid View–

    ............................................................................................................................ 59Entering Data in Text View–

    ............................................................................................................................ 63Validating the Document–

    ............................................................................................................................ 67Appending Elements and Attributes in Grid View–

    ............................................................................................................................ 69Editing in Database/Table View–

    ............................................................................................................................ 73Modifying the Schema–

    ............................................................................................................................75XSLT Transformations2.1.6

    ............................................................................................................................ 76Assigning an XSLT File–

    ............................................................................................................................ 76Transforming the XML File–

    ............................................................................................................................ 77Modifying the XSL File–

    ............................................................................................................................78Project Management2.1.7

    ............................................................................................................................ 79Benefits of Projects–

    ............................................................................................................................ 79Building a Project–

    ............................................................................................................................80That's It2.1.8

    .........................................................................................................................................81Authentic View Tutorial 2.2............................................................................................................................82Opening an XML Document in Authentic View2.2.1

    ............................................................................................................................83The Authentic View Interface2.2.2

    ............................................................................................................................85Node Operations2.2.3

    ............................................................................................................................88Entering Data in Authentic View2.2.4

    ............................................................................................................................90Entering Attribute Values2.2.5

    ............................................................................................................................90Adding Entities2.2.6

    ............................................................................................................................91Printing the Document2.2.7

    933 Text View

    .........................................................................................................................................94Visual Editing Guides in Text View 3.1

    .........................................................................................................................................95Entry Helpers in Text View 3.2

    .........................................................................................................................................97Editing XML Documents 3.3.........................................................................................................................................100Formatting in Text View 3.4.........................................................................................................................................101Output Windows 3.5

    ............................................................................................................................101Messages3.5.1

    ............................................................................................................................102Find in Files3.5.2

    ............................................................................................................................104XPath Evaluation3.5.3

    .........................................................................................................................................109XSL Outline 3.6............................................................................................................................110XSL Outline Window3.6.1

    ............................................................................................................................113Info Window3.6.2

    .........................................................................................................................................116Editing XQuery Documents 3.7............................................................................................................................116Opening an XQuery Document3.7.1

    ............................................................................................................................117XQuery Entry Helpers3.7.2

    ............................................................................................................................118XQuery Syntax Coloring3.7.3

    ............................................................................................................................120XQuery Intelligent Editing3.7.4

  • Altova XMLSpy 2008 Professional Edition 3

    ............................................................................................................................121Validation and Execution of XQuery Documents3.7.5

    ............................................................................................................................122XQuery And XML Databases3.7.6

    .........................................................................................................................................126Editing CSS Documents 3.8

    1294 Enhanced Grid View

    .........................................................................................................................................132Editing in Grid View 4.1

    .........................................................................................................................................134Database/Table View 4.2

    1385 Schema/WSDL View

    .........................................................................................................................................139Schema View 5.1............................................................................................................................144Schema Overview5.1.1

    ............................................................................................................................147Content Model View5.1.2

    ............................................................................................................................156Smart Restrictions5.1.3

    ............................................................................................................................161xml:base, xml:id, xml:lang, xml:space5.1.4

    ............................................................................................................................162Working with SchemaAgent5.1.5

    ............................................................................................................................ 163Connecting to SchemaAgent Server–

    ............................................................................................................................ 165Opening Schemas Found in the Search Path–

    ............................................................................................................................ 166Using Schema Constructs–

    ............................................................................................................................ 170Viewing Schemas in SchemaAgent–

    ............................................................................................................................ 170Extended Validation–

    .........................................................................................................................................173Schemas: Find and Replace 5.2............................................................................................................................174Search Term5.2.1

    ............................................................................................................................176Components5.2.2

    ............................................................................................................................177Properties5.2.3

    ............................................................................................................................180Scope5.2.4

    ............................................................................................................................181Find and Replace Commands5.2.5

    ............................................................................................................................182Results and Information5.2.6

    .........................................................................................................................................184WSDL View 5.3............................................................................................................................185Entry Helpers5.3.1

    1886 Authentic View

    .........................................................................................................................................190Interface 6.1............................................................................................................................190Overview of the GUI6.1.1

    ............................................................................................................................191Authentic View Toolbar Icons6.1.2

    ............................................................................................................................193Authentic View Main Window6.1.3

    ............................................................................................................................195Authentic View Entry Helpers6.1.4

    ............................................................................................................................199Authentic View Context Menus6.1.5

    .........................................................................................................................................201Editing in Authentic View 6.2............................................................................................................................201Basic Editing6.2.1

    ............................................................................................................................203Tables in Authentic View6.2.2

    ............................................................................................................................ 204SPS Tables–

  • 4 Altova XMLSpy 2008 Professional Edition

    ............................................................................................................................ 205XML Tables–

    ............................................................................................................................208Editing a DB6.2.3

    ............................................................................................................................ 208Navigating a DB Table–

    ............................................................................................................................ 209DB Queries–

    ............................................................................................................................ 213Modifying a DB Table–

    ............................................................................................................................214XML Table Editing Icons6.2.4

    ............................................................................................................................216Working with Dates6.2.5

    ............................................................................................................................ 217Date Picker–

    ............................................................................................................................ 217Text Entry–

    ............................................................................................................................218Defining Entities6.2.6

    ............................................................................................................................219Images in Authentic View6.2.7

    ............................................................................................................................220Keystrokes in Authentic View6.2.8

    2217 Browser View

    2228 Altova Global Resources

    .........................................................................................................................................223Defining Global Resources 8.1............................................................................................................................225Files8.1.1

    ............................................................................................................................227Folders8.1.2

    ............................................................................................................................228Databases8.1.3

    .........................................................................................................................................230Using Global Resources 8.2............................................................................................................................230Assigning Files and Folders8.2.1

    ............................................................................................................................232Assigning Databases8.2.2

    ............................................................................................................................233Changing Configurations8.2.3

    2359 XMLSpy in MS Visual Studio .NET

    .........................................................................................................................................237How the .NET and Standalone Versions Differ 9.1

    .........................................................................................................................................241Visual Studio .NET and XSLT Debugger 9.2

    .........................................................................................................................................244Visual Studio .NET and SOAP Debugger 9.3

    24610 XMLSpy in Eclipse Platform

    .........................................................................................................................................247Starting Eclipse and using the XMLSpy Plug-in 10.1

    .........................................................................................................................................249Creating XML files in Eclipse 10.2

    .........................................................................................................................................251Importing XML files into folders 10.3

    .........................................................................................................................................254Differences between Eclipse and standalone versions 10.4

    .........................................................................................................................................255Eclipse Platform and XSLT Debugger 10.5

    .........................................................................................................................................257Eclipse views and perspectives 10.6

  • Altova XMLSpy 2008 Professional Edition 5

    25911 XSLT and XQuery Debugger

    .........................................................................................................................................261Mechanism and Interface 11.1

    .........................................................................................................................................263Commands and Toolbar Icons 11.2

    .........................................................................................................................................266Settings 11.3

    .........................................................................................................................................268Starting a Debugging Session 11.4

    .........................................................................................................................................270Information Windows 11.5............................................................................................................................271Context Window11.5.1

    ............................................................................................................................271Variables Window11.5.2

    ............................................................................................................................272XPath-Watch Window11.5.3

    ............................................................................................................................272Call Stack Window11.5.4

    ............................................................................................................................273Messages Window11.5.5

    ............................................................................................................................273Templates Window11.5.6

    ............................................................................................................................273Info Window11.5.7

    ............................................................................................................................274Trace Window11.5.8

    ............................................................................................................................274Arranging the Information Windows11.5.9

    .........................................................................................................................................276Breakpoints 11.6

    .........................................................................................................................................279Tracepoints 11.7

    28412 User Reference

    .........................................................................................................................................285File Menu 12.1............................................................................................................................285New12.1.1

    ............................................................................................................................288Open12.1.2

    ............................................................................................................................289Open URL12.1.3

    ............................................................................................................................290Open Global Resource12.1.4

    ............................................................................................................................291Reload12.1.5

    ............................................................................................................................291Encoding12.1.6

    ............................................................................................................................292Close, Close All12.1.7

    ............................................................................................................................292Save, Save As, Save All12.1.8

    ............................................................................................................................292Save to URL12.1.9

    ............................................................................................................................293Send by Mail12.1.10

    ............................................................................................................................294Print12.1.11

    ............................................................................................................................295Print Preview, Print Setup12.1.12

    ............................................................................................................................296Recent Files, Exit12.1.13

    .........................................................................................................................................297Edit Menu 12.2............................................................................................................................298Undo, Redo12.2.1

    ............................................................................................................................298Cut, Copy, Past, Delete12.2.2

    ............................................................................................................................298Copy as XML-Text12.2.3

    ............................................................................................................................299Copy as Structured Text12.2.4

    ............................................................................................................................301Insert File Path12.2.5

    ............................................................................................................................301Insert XInclude12.2.6

    ............................................................................................................................303Copy XPath12.2.7

  • 6 Altova XMLSpy 2008 Professional Edition

    ............................................................................................................................303Copy XPointer12.2.8

    ............................................................................................................................304Pretty-Print XML Text12.2.9

    ............................................................................................................................304Select All12.2.10

    ............................................................................................................................304Find, Find Next12.2.11

    ............................................................................................................................307Replace12.2.12

    ............................................................................................................................308Find in Files12.2.13

    ............................................................................................................................310Bookmark Commands12.2.14

    ............................................................................................................................310Comment In/Out12.2.15

    .........................................................................................................................................312Project Menu 12.3............................................................................................................................313New Project12.3.1

    ............................................................................................................................314Open Project12.3.2

    ............................................................................................................................314Reload Project12.3.3

    ............................................................................................................................314Close Project12.3.4

    ............................................................................................................................314Save Project12.3.5

    ............................................................................................................................314Source control12.3.6

    ............................................................................................................................ 316Open Project–

    ............................................................................................................................ 318Enable Source Code Control–

    ............................................................................................................................ 319Get Latest Version–

    ............................................................................................................................ 319Check Out–

    ............................................................................................................................ 320Check In–

    ............................................................................................................................ 321Undo Check Out...–

    ............................................................................................................................ 321Add to Source Control–

    ............................................................................................................................ 323Remove from Source Control–

    ............................................................................................................................ 323Show History–

    ............................................................................................................................ 324Show Differences–

    ............................................................................................................................ 325Properties–

    ............................................................................................................................ 326Refresh Status–

    ............................................................................................................................ 326Run Native Interface–

    ............................................................................................................................326Add Files to Project12.3.7

    ............................................................................................................................326Add Global Resource to Project12.3.8

    ............................................................................................................................327Add URL to Project12.3.9

    ............................................................................................................................327Add Active File to Project12.3.10

    ............................................................................................................................327Add Active And Related Files to Project12.3.11

    ............................................................................................................................327Add Project Folder to Project12.3.12

    ............................................................................................................................327Add External Folder to Project12.3.13

    ............................................................................................................................330Add External Web Folder to Project12.3.14

    ............................................................................................................................333Project Properties12.3.15

    ............................................................................................................................334Most Recently Used Projects12.3.16

    .........................................................................................................................................336XML Menu 12.4............................................................................................................................336Insert12.4.1

    ............................................................................................................................ 337Insert Attribute–

    ............................................................................................................................ 337Insert Element–

    ............................................................................................................................ 337Insert Text–

    ............................................................................................................................ 338Insert CDATA–

    ............................................................................................................................ 338Insert Comment–

  • Altova XMLSpy 2008 Professional Edition 7

    ............................................................................................................................ 338Insert XML–

    ............................................................................................................................ 338Insert Processing Instruction–

    ............................................................................................................................ 338Insert XInclude–

    ............................................................................................................................ 340Insert DOCTYPE–

    ............................................................................................................................ 341Insert ExternalID–

    ............................................................................................................................ 341Insert ELEMENT–

    ............................................................................................................................ 342Insert ATTLIST–

    ............................................................................................................................ 342Insert ENTITY–

    ............................................................................................................................ 342Insert NOTATION–

    ............................................................................................................................342Append12.4.2

    ............................................................................................................................ 343Append Attribute–

    ............................................................................................................................ 343Append Element–

    ............................................................................................................................ 343Append Text–

    ............................................................................................................................ 344Append CDATA–

    ............................................................................................................................ 344Append Comment–

    ............................................................................................................................ 344Append XML–

    ............................................................................................................................ 344Append Processing Instruction–

    ............................................................................................................................ 344Append XInclude–

    ............................................................................................................................ 346Append DOCTYPE–

    ............................................................................................................................ 347Append ExternalID–

    ............................................................................................................................ 347Append ELEMENT–

    ............................................................................................................................ 347Append ATTLIST–

    ............................................................................................................................ 348Append ENTITY–

    ............................................................................................................................ 348Append NOTATION–

    ............................................................................................................................348Add Child12.4.3

    ............................................................................................................................ 349Add Child Attribute–

    ............................................................................................................................ 349Add Child Element–

    ............................................................................................................................ 349Add Child Text–

    ............................................................................................................................ 349Add Child CDATA–

    ............................................................................................................................ 350Add Child Comment–

    ............................................................................................................................ 350Add Child XML–

    ............................................................................................................................ 350Add Child Processing Instruction–

    ............................................................................................................................ 350Add Child XInclude–

    ............................................................................................................................ 352Add Child DOCTYPE–

    ............................................................................................................................ 352Add Child ExternalID–

    ............................................................................................................................ 353Add Child ELEMENT–

    ............................................................................................................................ 353Add Child ATTLIST–

    ............................................................................................................................ 353Add Child ENTITY–

    ............................................................................................................................ 353Add Child NOTATION–

    ............................................................................................................................354Convert To12.4.4

    ............................................................................................................................ 354Convert To Attribute–

    ............................................................................................................................ 354Convert To Element–

    ............................................................................................................................ 354Convert To Text–

    ............................................................................................................................ 354Convert To CDATA–

    ............................................................................................................................ 355Convert To Comment–

  • 8 Altova XMLSpy 2008 Professional Edition

    ............................................................................................................................ 355Convert To XML–

    ............................................................................................................................ 355Convert To Processing Instruction–

    ............................................................................................................................ 355Convert To DOCTYPE–

    ............................................................................................................................ 355Convert To ExternalID–

    ............................................................................................................................ 355Convert To ELEMENT–

    ............................................................................................................................ 355Convert To ATTLIST–

    ............................................................................................................................ 355Convert To ENTITY–

    ............................................................................................................................ 356Convert To NOTATION–

    ............................................................................................................................356Table12.4.5

    ............................................................................................................................ 356Display as Table–

    ............................................................................................................................ 357Insert Row–

    ............................................................................................................................ 357Append Row–

    ............................................................................................................................ 357Ascending Sort–

    ............................................................................................................................ 358Descending Sort–

    ............................................................................................................................358Move Left12.4.6

    ............................................................................................................................358Move Right12.4.7

    ............................................................................................................................359Enclose in Element12.4.8

    ............................................................................................................................359Evaluate XPath12.4.9

    ............................................................................................................................359Check Well-Formedness12.4.10

    ............................................................................................................................360Validate12.4.11

    ............................................................................................................................363Update Entry-Helpers12.4.12

    ............................................................................................................................364Namespace Prefix.12.4.13

    .........................................................................................................................................365DTD/Schema Menu 12.5............................................................................................................................365Assign DTD12.5.1

    ............................................................................................................................365Assign Schema12.5.2

    ............................................................................................................................366Include another DTD12.5.3

    ............................................................................................................................366Go to DTD12.5.4

    ............................................................................................................................366Go to Schema12.5.5

    ............................................................................................................................366Go to Definition12.5.6

    ............................................................................................................................367Generate DTD/Schema12.5.7

    ............................................................................................................................369Convert DTD/Schema12.5.8

    ............................................................................................................................371Convert to UML12.5.9

    ............................................................................................................................373Map to other DTD/Schema or DB in MapForce...12.5.10

    ............................................................................................................................373Design HTML/PDF Output in StyleVision...12.5.11

    ............................................................................................................................373Generate Sample XML File12.5.12

    ............................................................................................................................374Flush Memory Cache12.5.13

    .........................................................................................................................................375Schema Design Menu 12.6............................................................................................................................375Schema Settings12.6.1

    ............................................................................................................................377Save Diagram12.6.2

    ............................................................................................................................377Generate Documentation12.6.3

    ............................................................................................................................379Configure View12.6.4

    ............................................................................................................................383Zoom12.6.5

    ............................................................................................................................383Display All Globals12.6.6

    ............................................................................................................................384Display Diagram12.6.7

    ............................................................................................................................384Enable Oracle Schema Extensions12.6.8

  • Altova XMLSpy 2008 Professional Edition 9

    ............................................................................................................................385Oracle Schema Settings12.6.9

    ............................................................................................................................385Enable Microsoft SQL Server Schema Extensions12.6.10

    ............................................................................................................................386Named Schema Relationships12.6.11

    ............................................................................................................................387Unnamed Element Relationships12.6.12

    ............................................................................................................................387Connect to SchemaAgent Server12.6.13

    ............................................................................................................................388Disconnect from SchemaAgent Server12.6.14

    ............................................................................................................................388Show in SchemaAgent12.6.15

    ............................................................................................................................388Extended Validation12.6.16

    .........................................................................................................................................389XSL/XQuery Menu 12.7............................................................................................................................390XSL Transformation12.7.1

    ............................................................................................................................391XSL:FO Transformation12.7.2

    ............................................................................................................................392XSL Parameters/XQuery Variables12.7.3

    ............................................................................................................................395XQuery Execution12.7.4

    ............................................................................................................................396Assign XSL12.7.5

    ............................................................................................................................396Assign XSL:FO12.7.6

    ............................................................................................................................396Assign Sample XML file12.7.7

    ............................................................................................................................397Go to XSL12.7.8

    ............................................................................................................................397Start Debugger/Go12.7.9

    ............................................................................................................................397Stop Debugger12.7.10

    ............................................................................................................................397Restart Debugger12.7.11

    ............................................................................................................................397End Debugger Session12.7.12

    ............................................................................................................................398Step Into12.7.13

    ............................................................................................................................398Step Out12.7.14

    ............................................................................................................................398Step Over12.7.15

    ............................................................................................................................398Show Current Execution Node12.7.16

    ............................................................................................................................398Insert/Remove Breakpoint12.7.17

    ............................................................................................................................399Insert/Remove Tracepoint12.7.18

    ............................................................................................................................399Enable/Disable Breakpoint12.7.19

    ............................................................................................................................399Enable/Disable Tracepoint12.7.20

    ............................................................................................................................399Breakpoints/Tracepoints12.7.21

    ............................................................................................................................400Debug Windows12.7.22

    ............................................................................................................................400XSLT/XQuery Settings12.7.23

    .........................................................................................................................................401Authentic Menu 12.8............................................................................................................................401New Document12.8.1

    ............................................................................................................................402Edit Database Data12.8.2

    ............................................................................................................................403Assign/Edit a StyleVision Stylesheet12.8.3

    ............................................................................................................................403Select New Row with XML Data for Editing12.8.4

    ............................................................................................................................404Define XML Entities12.8.5

    ............................................................................................................................406Hide Markup, Show Small/Large/Mixed Markup12.8.6

    ............................................................................................................................406Append/Insert/Duplicate/Delete Row12.8.7

    ............................................................................................................................407Move Row Up/Down12.8.8

    .........................................................................................................................................408DB Menu 12.9............................................................................................................................408Connecting to a Data Source12.9.1

    ............................................................................................................................ 409Connection Wizard–

    ............................................................................................................................ 411Existing Connections–

  • 10 Altova XMLSpy 2008 Professional Edition

    ............................................................................................................................ 412ADO Connections–

    ............................................................................................................................ 416ODBC Connections–

    ............................................................................................................................ 418Global Resources–

    ............................................................................................................................419Query Database12.9.2

    ............................................................................................................................ 421Data Sources–

    ............................................................................................................................ 422Browser Pane: Viewing the DB Objects–

    ............................................................................................................................ 426Query Pane: Description and Features–

    ............................................................................................................................ 429Query Pane: Working with Queries–

    ............................................................................................................................ 429Results and Messages–

    ............................................................................................................................432IBM DB212.9.3

    ............................................................................................................................ 432Assign XML Schema–

    ............................................................................................................................434Oracle XML DB12.9.4

    ............................................................................................................................ 435Search–

    ............................................................................................................................ 436List Schemas–

    ............................................................................................................................ 437Add Schema–

    ............................................................................................................................ 438Browse Oracle XML documents–

    ............................................................................................................................ 439Properties–

    ............................................................................................................................ 440Adding XML document instances–

    .........................................................................................................................................441Convert Menu 12.10............................................................................................................................441Import Text File12.10.1

    ............................................................................................................................443Import Database Data12.10.2

    ............................................................................................................................447Import Microsoft Word Document12.10.3

    ............................................................................................................................448Create XML Schema from DB Structure12.10.4

    ............................................................................................................................452DB Import Based on XML Schema12.10.5

    ............................................................................................................................453Create DB Structure from XML Schema12.10.6

    ............................................................................................................................456Export to Text Files12.10.7

    ............................................................................................................................459Export to a Database12.10.8

    .........................................................................................................................................462View Menu 12.11............................................................................................................................462Text View12.11.1

    ............................................................................................................................462Enhanced Grid View12.11.2

    ............................................................................................................................462Schema/WSDL Design View12.11.3

    ............................................................................................................................463Authentic View12.11.4

    ............................................................................................................................463Browser View12.11.5

    ............................................................................................................................463Expand12.11.6

    ............................................................................................................................463Collapse12.11.7

    ............................................................................................................................464Expand Fully12.11.8

    ............................................................................................................................464Collapse Unselected12.11.9

    ............................................................................................................................464Optimal Widths12.11.10

    ............................................................................................................................464Word Wrap12.11.11

    ............................................................................................................................464Go to Line/Char12.11.12

    ............................................................................................................................465Go to File12.11.13

    ............................................................................................................................465Line Numbers Margin12.11.14

    ............................................................................................................................465Bookmarks Margin12.11.15

    ............................................................................................................................465Source Folding Margin12.11.16

    ............................................................................................................................466Indentation Guides12.11.17

  • Altova XMLSpy 2008 Professional Edition 11

    .........................................................................................................................................467Browser Menu 12.12............................................................................................................................467Back12.12.1

    ............................................................................................................................467Forward12.12.2

    ............................................................................................................................467Stop12.12.3

    ............................................................................................................................467Refresh12.12.4

    ............................................................................................................................467Fonts12.12.5

    ............................................................................................................................467Separate Window12.12.6

    .........................................................................................................................................468Tools Menu 12.13............................................................................................................................468Spelling12.13.1

    ............................................................................................................................470Spelling Options12.13.2

    ............................................................................................................................474Switch to Scripting Environment12.13.3

    ............................................................................................................................474Show Macros12.13.4

    ............................................................................................................................475Project12.13.5

    ............................................................................................................................ 475Assign Script to Project–

    ............................................................................................................................ 475Unassign Scripts from Project–

    ............................................................................................................................ 475Project Scripts Active–

    ............................................................................................................................475Comparisons12.13.6

    ............................................................................................................................ 475Compare Open File With–

    ............................................................................................................................ 478Compare Directories–

    ............................................................................................................................ 480Compare Options–

    ............................................................................................................................483Global Resources12.13.7

    ............................................................................................................................483Active Configuration12.13.8

    ............................................................................................................................484Customize12.13.9

    ............................................................................................................................ 484Commands–

    ............................................................................................................................ 485Toolbars–

    ............................................................................................................................ 486Keyboard–

    ............................................................................................................................ 491Menu–

    ............................................................................................................................ 493Macros–

    ............................................................................................................................ 494Plug-Ins–

    ............................................................................................................................ 495Options–

    ............................................................................................................................ 495Customize Context Menu–

    ............................................................................................................................497Options12.13.10

    ............................................................................................................................ 497File–

    ............................................................................................................................ 499File Types–

    ............................................................................................................................ 501Editing–

    ............................................................................................................................ 502View–

    ............................................................................................................................ 503Grid Fonts–

    ............................................................................................................................ 504Schema Fonts–

    ............................................................................................................................ 505Text Fonts–

    ............................................................................................................................ 506Colors–

    ............................................................................................................................ 507Encoding–

    ............................................................................................................................ 508XSL–

    ............................................................................................................................ 509Scripting–

    .........................................................................................................................................511Window Menu 12.14............................................................................................................................511Cascade12.14.1

  • 12 Altova XMLSpy 2008 Professional Edition

    ............................................................................................................................511Tile Horizontally12.14.2

    ............................................................................................................................511Tile Vertically12.14.3

    ............................................................................................................................511Project Window12.14.4

    ............................................................................................................................511Info Window12.14.5

    ............................................................................................................................512Entry Helpers12.14.6

    ............................................................................................................................512Output Windows12.14.7

    ............................................................................................................................512Project and Entry Helpers12.14.8

    ............................................................................................................................512All On/Off12.14.9

    ............................................................................................................................512Currently Open Window List12.14.10

    .........................................................................................................................................514Help Menu 12.15............................................................................................................................514Table of Contents12.15.1

    ............................................................................................................................514Index12.15.2

    ............................................................................................................................514Search12.15.3

    ............................................................................................................................515Keyboard Map12.15.4

    ............................................................................................................................515Activation, Order Form, Registration, Updates12.15.5

    ............................................................................................................................516Support Center, FAQ, Downloads12.15.6

    ............................................................................................................................517On the Internet12.15.7

    ............................................................................................................................517About12.15.8

    Programmers' Reference 520

    5211 Release Notes

    5232 Scripting

    .........................................................................................................................................525Usage Overview 2.1............................................................................................................................525Scripting Projects and the Project Window2.1.1

    ............................................................................................................................526Editing in the Main Window2.1.2

    ............................................................................................................................528Forms, Event Handlers, and Macros2.1.3

    ............................................................................................................................529Scripting Settings2.1.4

    .........................................................................................................................................530Forms 2.2............................................................................................................................530Editor Views2.2.1

    ............................................................................................................................532Form Design2.2.2

    ............................................................................................................................533Object Properties and Events2.2.3

    ............................................................................................................................535Object: TheView2.2.4

    ............................................................................................................................536Example: Creating a Form2.2.5

    ............................................................................................................................541Example: Using Colors2.2.6

    .........................................................................................................................................542Application Event Handlers 2.3

    .........................................................................................................................................545Macros 2.4............................................................................................................................545Creating a New Macro2.4.1

  • Altova XMLSpy 2008 Professional Edition 13

    ............................................................................................................................546Creating Functions for the Macro2.4.2

    ............................................................................................................................547Running a Macro2.4.3

    ............................................................................................................................548Modifying a Macro2.4.4

    .........................................................................................................................................550Menus 2.5............................................................................................................................550File2.5.1

    ............................................................................................................................551Edit2.5.2

    ............................................................................................................................551View2.5.3

    ............................................................................................................................552Project2.5.4

    ............................................................................................................................552Layout2.5.5

    ............................................................................................................................555Draw2.5.6

    ............................................................................................................................556Window2.5.7

    .........................................................................................................................................557Programming Points 2.6

    5583 XMLSpy Plugins

    .........................................................................................................................................559Registration of IDE PlugIns 3.1

    .........................................................................................................................................560ActiveX Controls 3.2

    .........................................................................................................................................561Configuration XML 3.3

    .........................................................................................................................................564ATL sample files 3.4............................................................................................................................564Interface description (IDL)3.4.1

    ............................................................................................................................566Class definition3.4.2

    ............................................................................................................................566Implementation3.4.3

    .........................................................................................................................................569IXMLSpyPlugIn 3.5............................................................................................................................569OnCommand3.5.1

    ............................................................................................................................570OnUpdateCommand3.5.2

    ............................................................................................................................570OnEvent3.5.3

    ............................................................................................................................572GetUIModifications3.5.4

    ............................................................................................................................573GetDescription3.5.5

    5744 The XMLSpy API

    .........................................................................................................................................575Overview 4.1............................................................................................................................575Object model4.1.1

    ............................................................................................................................576Simple document access4.1.2

    ............................................................................................................................577Error handling4.1.3

    ............................................................................................................................579Events4.1.4

    ............................................................................................................................582Import and export of data4.1.5

    ............................................................................................................................584Using XMLData to modify document structure4.1.6

    ............................................................................................................................588The DOM and XMLData4.1.7

    ............................................................................................................................590Obsolete Authentic View Row operations4.1.8

    ............................................................................................................................591Obsolete Authentic View Editing operations4.1.9

    .........................................................................................................................................593Usage Examples 4.2............................................................................................................................593JScript: Bubble Sort Dynamic Tables4.2.1

    ............................................................................................................................594VBScript: Using object-level events4.2.2

  • 14 Altova XMLSpy 2008 Professional Edition

    .........................................................................................................................................596Interfaces 4.3............................................................................................................................596Application4.3.1

    ............................................................................................................................ 597Events–

    ....................................................................................................................... 597OnBeforeOpenDocument

    ....................................................................................................................... 598OnBeforeOpenProject

    ....................................................................................................................... 598OnDocumentOpened

    ....................................................................................................................... 599OnProjectOpened

    ............................................................................................................................ 599ActiveDocument–

    ............................................................................................................................ 600AddMacroMenuItem–

    ............................................................................................................................ 600Application–

    ............................................................................................................................ 600ClearMacroMenu–

    ............................................................................................................................ 600CurrentProject–

    ............................................................................................................................ 601Dialogs–

    ............................................................................................................................ 601Documents–

    ............................................................................................................................ 601FindInFiles–

    ............................................................................................................................ 601GetDatabaseImportElementList–

    ............................................................................................................................ 602GetDatabaseSettings–

    ............................................................................................................................ 602GetDatabaseTables–

    ............................................................................................................................ 603GetExportSettings–

    ............................................................................................................................ 603GetTextImportElementList–

    ............................................................................................................................ 604GetTextImportExportSettings–

    ............................................................................................................................ 604ImportFromDatabase–

    ............................................................................................................................ 605ImportFromSchema–

    ............................................................................................................................ 606ImportFromText–

    ............................................................................................................................ 607ImportFromWord–

    ............................................................................................................................ 607NewProject–

    ............................................................................................................................ 607OpenProject–

    ............................................................................................................................ 608Parent–

    ............................................................................................................................ 608Quit–

    ............................................................................................................................ 608ReloadSettings–

    ............................................................................................................................ 609RunMacro–

    ............................................................................................................................ 609ScriptingEnvironment–

    ............................................................................................................................ 609ShowApplication–

    ............................................................................................................................ 610ShowFindInFiles–

    ............................................................................................................................ 610ShowForm–

    ............................................................................................................................ 610URLDelete–

    ............................................................................................................................ 611URLMakeDirectory–

    ............................................................................................................................ 611Visible–

    ............................................................................................................................ 611WarningNumber–

    ............................................................................................................................ 611WarningText–

    ............................................................................................................................612AuthenticDataTransfer4.3.2

    ............................................................................................................................ 612dropEffect–

    ............................................................................................................................ 613getData–