Validating the XML Format
Once the data file is extracted from the legacy system and converted to XML, it is important to validate the data file before to attempting to load it to the Windchill system. Any XML editor that performs validation against a DTD, such as XMLSpy, can be used for validating data against the standardX20.dtd.
The csvmapfile.dtd file is located in <Windchill>\codebase\registry\ixb\dtds\standardX20.dtd.
csvmapfile.dtd is not the complete DTD. For validation, the standardX20.dtd at <Windchill>\loadXMLFiles should be used.
Execute the UpdateEditDTDUtility to ensure standardX20.dtd is the most current version. For more information, see the section About UpdateEditDTDUtility.
Ensure that the following line is in your XML data files:
<!DOCTYPE NmLoader SYSTEM "standardX20.dtd">
Selecting the Appropriate DTD at Runtime
DTDs are available for use during runtime of the LoadFromFile and LoadFileSet utilities. Refer to the Windchill installation for the complete list of DTDs. The following DTDs are located in the <Windchill>\codebase\registry\ixb\dtds\standardX20.dtd directory:
csvmapfile.dtd—Describes data converted from CSV format, as well as some basic definitions such as those for containers
netmarkets.dtd—Provides Windchill ProjectLink definitions
pdmlink.dtd—Provides Windchill PDMLink definitions
coreobjects.dtd—DTD for import and export
search.dtd—DTD for import and export of saved searches
logiccomponent.dtd—Defines the configuration logic of the configurable part
These DTDs are appended together at runtime and form a single DTD file. To specify the DTD in an XML data file, add the following line:
<!DOCTYPE NmLoader SYSTEM "standardX20.dtd">
* 
Internally, the load framework locates the directory <Windchill>\codebase\registry\ixb\dtds\standardX20.dtd and creates a combined DTD from all DTD files in the folder. Ensure that this folder does not contain backup files. All backups should be placed in a separate location.
To obtain the validation DTD that is synchronized with the runtime DTD, run the following command:
windchill wt.load.util.UpdateEditDTDUtility
About UpdateEditDTDUtility
To obtain the validation DTD that is synchronized with the runtime DTD, execute UpdateEditDTDUtility. This utility propagates your changes to the following file:
<Windchill>\loadXMLFiles\standard<current_windchill_release>.dtd
Usage
java wt.load.util.UpdateEditDTDUtility <mode>_<Windchill>_<dtd_name>_<dtd_location><verbose>
Where:
mode is the default value for this parameter is USER.
Windchill is the Windchill home installation path.
dtd_name is the name of the DTD that needs to be updated, such as standardX20.dtd.
dtd_location is the directory location where the DTD resides or will be created if it does not already exist.
verbose indicates that the utility will run in debug mode.
* 
All arguments are optional. However, the order of the arguments should be preserved, if provided.
The utility accepts user input for both dtd_name and dtd_location. This mode allows the DTD updates for previous releases; however, by default, the current release DTD is updated. If no input is provided for the dtd_name and dtd_location parameters, the values for these are obtained from the wt.properties through the com.ptc.netmarkets.ixb.dtdName and com.ptc.netmarkets.ixb.dtdLocation properties. If none of these are provided, the default values are assumed.
The default value for com.ptc.netmarkets.ixb.dtdName is <current_release>dtd.
The default value for com.ptc.netmarkets.ixb.dtdLocation is <Windchill>/load XMLFiles.
These properties can be specified in wt.properties.
Other features include:
The utility backs up the existing DTD and creates a new updated DTD.
If the dtd_location does not exist, it is created.
If no parameters are supplied, the usage looks like the following. In this case, the defaults are assumed for all parameters.
java wt.load.util.UpdateEditDTDUTILITY
The following example contains the default values:
For com.ptcnetmarkets.ixb.dtdName=standardX20dtd, the content of all the DTDs residing at <Windchill>/codebase/registry/ixb/dtds/standardX20.dtd is aggregated and copied to the standardX20.dtd residing at the location specified by com.ptcnetmarkets.ixb.dtdLocation=<Windchill>\loadXMLFiles.
* 
This utility works only for DTDs in the following directory:
<Windchill>/codebase/registry/ixb/dtds
Using XMLSpy to Validate the Data Files
XMLSpy provides an orderly way to view and enter XML data. Data can be displayed in standard text form, grid entry, or browser mode. The following image displays a user load file in table format (grid mode), where you can directly enter data:
Validating the Proper Format of an XML Load File
1. Open the XML file in XMLSpy and assign the DTD using the Assign DTD option.
2. Click Browse to locate and select the proper DTD.
3. Click OK to assign the DTD.
A warning appears stating that there is an external DTD already assigned.
4. Click OK to continue.
The validation displays in the lower pane.
도움이 되셨나요?