Creating and Editing Projects
Projects are managed via the Project Window (screenshot below) and the Project menu. One project can be open at a time in the application. The open project is displayed in the Project Window.
Creating new projects, opening existing projects
A new project is created with the menu command Project | New Project. An existing project is opened with the menu command Project | Open Project. The newly opened project (whether new or existing) replaces the previously opened project in the Project Window. If the previously opened project contains unsaved changes (indicated by an asterisk next to the folder name; see screenshot below), you are asked whether you wish to save these changes.
Naming and saving projects
A new project is named when you save it. A project is saved with the Project | Save Project command and has the .spp file extension. After a project has been modified, the project must be saved for the modifications to be stored. Note that a project (indicated by the top-level folder in the Project Window) can only be re-named by changing its name in Windows File Explorer; the name cannot be changed in the GUI. (The names of sub-folders, however, can be changed in the GUI.)
Project structure
A project has a tree structure of folders and files. Folders and files can be created at any level and to an unlimited depth. Do this by selecting a folder in the Project Window and then using the commands in the Project menu or context menu to add folders, files, or resources. Folders, files, and resources that have been added to a project can be deleted or dragged to other locations in the project tree.
When a new project is created, the default project structure organizes the project by file type (XML, XSL, etc) (see screenshot below).
File-type extensions are associated with a folder via the property definitions for that folder. When a file is added to a folder, it is automatically added to the appropriate child folder according to the file-type extension. For each folder, you can define what file-type extensions are to be associated with it.
What can be added to a project
Folder, files, and other resources can be added either to the top-level project folder or to a folder at any level in the project. There are three types of folders: (i) project folders; (ii) external folders; (iii) external web folders.
To add an object, select the relevant folder and then the required command from the Project menu or context menu of the selected folder. The following objects are available for addition to a project folder
•Project folders (green) are folders that you add to the project in order to structure the project's contents. You can define what file extensions are to be associated with a project folder (in the properties of that folder). When files are added to a folder, they are automatically added to the first child folder that has that file's extension associated with it. Consequently, when multiple files are added to a folder, they will be distributed by file extension among the child folders that have the corresponding file-extension associations.
•External folders (yellow) are folders in a file system. When an external folder is added to a folder, the external folder and all its files, sub-folders, and sub-folder files are included in the project. Defining file extensions on an external folder serves to filter the files available in the project.
•External web folders are like external folders, except that they are located on a web server and require user authentication to access. Defining file extensions on an external web folder serves to filter the files available in the project.
•Files can be added to a folder by selecting the folder and then using one of the three Add-File commands: (i) Add Files, to select the file/s via an Open dialog; (ii) Add Active File, to add the file that is active in the Main Window; (iii) Add Active and Related Files, additionally adds files related to an active XML file, for example, an XML Schema or DTD. Note that files associated by means of a processing instruction (for example, XSLT files), are not considered to be related files.
•Global Resources are aliases for file, folder, and database resources. How they are defined and used is described in the section on Global Resources.
•URLs identify a resource object via a URL.
•An Altova Scripting Project, which is a .asprj file, can be assigned to an XMLSpy project. This will make macros and other scripts available to the project. How to create a Scripting Project and assign one to an XMLSpy project is described in the section, Scripting.
Project and folder properties
Properties (such as the schema for validation and the XSLT for transformation) can be set not only on the entire project, but also on individual folders. You can then carry out actions, such as validation and transformation, on the entire project or individual folders. To carry out an action, right-click the project or folder, and select the action you want to carry out from the context menu that appears.
The properties of a folder are stored in the Properties dialog of that folder, which is accessed by first selecting the folder and then the menu command Project | Properties (or the folder's context menu command Properties). The following properties of a folder can be defined and edited in the Properties dialog:
•Folder name: cannot be edited for the top-level project folder (for which, instead of a name, a filepath is displayed).
•File extensions: cannot be edited for the top-level project. This is a list of file extensions separated by semi-colons (for example, xml;svg;wml). This list determines what files are added to the folder when files are added to a project. For example, when active and related files are added to a project, then the File extensions determine into which folders the added files will be placed.
•Validation: specifies the DTD or XML Schema file that should be used to validate XML files in a folder.
•Transformations: specifies (i) the XSLT files to be used for transforming XML files in the folder, and (ii) the XML files to be transformed with XSLT files in the folder.
•Destination files: for the output of transformations, specifies the file extension and the folder where the files are to be saved.
•SPS files for Authentic View: specifies the SPS files to be used so that XML files in a folder can be viewed and edited in Authentic View.
Note the following points:
•A property that is set on a folder overrides the same property that is set on the project.
•If a property is set on the project, it is applied to all folders that do not have the same property set.
•If an action is carried out on a project, it is applied to all applicable file types in all folders of the project. For example, if a validation is carried out on a project, the validation is run on all XML files in all folders of the project. In this case, the schema that has been set for the project is used for all validations, except for XML files that are in folders which have the schema validation property set to some other schema.
See the description of the Project | Properties command for more detailed information.
Source control in projects
Source control systems that are compatible with Microsoft Visual Source-Safe are supported in projects. How to use this feature is described in the User Reference section of the manual.
Saving projects
Any changes you make to a project, such as adding or deleting a file, or modifying a project property, must be saved with the Save Project command.
Find in project
You can search for project files and folders using their names or a part of their name. If the search is successful, files or folders that are located are highlighted one by one.
To start a search, activate the Project window by clicking it (or in it), then select the command Edit | Find (or the shortcut Ctrl+F). In the Find dialog that pops up (screenshot below) enter the text string you wish to search for and select or deselect the search options (explained below) according to your requirements.
The following search options are available:
•Whole-word matching is more restricted since the entire string must match an entire word in the file or folder name. In file names, the parts before and after the dot (without the dot) are each treated as a word.
•It can be specified that casing in the search string must exactly match the text string in the file or folder name.
•Folder names can be included in the search. Otherwise, only file names are searched.
•External folders can be included or excluded from the search. External folders are actual folders on the system or network, as opposed to project folders, which are created within the project and not on the system.
If the search is successful, the first matching item is highlighted in the Project sidebar. You can then browse through all the returned matching items by clicking the Find Next and Find Prev buttons in the Find dialog.
Refreshing projects
If a change is made to an external folder, this change will not be reflected in the Project Window till the project is refreshed.