Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
2.8 KiB

  1. This directory contains the conversion tools necessary to transform our
  2. DTDs into XSD (XML Schema Documents) suitable for integration into the
  3. VS7 XML editing environment.
  4. Please be aware that currently this is a non-automated process. The steps
  5. you need to carry out to do this are as follows:
  6. 1) If you haven't done so, install MSXML 2.6 on your host; this is needed
  7. for the final stage of the conversion. The msxmlwr.exe included in
  8. this folder contains the latest (March 2000) web preview release of
  9. MXSML. You'll need to run this to install MSXML.
  10. 2) If a DTD file has changed, you will need to check out the following
  11. files from the .\DTD subdirectory
  12. <dtdname>.xdr
  13. <dtdname>.xds
  14. where <dtdname> is the DTD file prefix (e.g. CIM20, WMI20).
  15. 3) Run the dtd2schema.exe utility on the DTD, to generate the XDR file.
  16. dtd2schema -o ..\dtd\<dtdname>.xdr ..\dtd\<dtdname>.dtd
  17. 4) Hand-edit the .XDR file produced so that the following changes are
  18. made:
  19. - Wherever a DTD production of the form
  20. <!ELEMENT FOO (BAR, BAR+)>
  21. occurs (currently only the MULTIREQ and MULTIRSP elements fit
  22. this pattern), change the output in the XDR file from
  23. <ElementType name="FOO" content="eltOnly">
  24. <group order="seq">
  25. <element type="BAR"/>
  26. <element type="BAR"/>
  27. </group>
  28. </ElementType>
  29. to
  30. <ElementType name="FOO" content="eltOnly">
  31. <group order="seq">
  32. <element type="BAR"/>
  33. <element type="BAR" maxOccurs="*"/>
  34. </group>
  35. </ElementType>
  36. 5) Then run the convert.js utility on the XDR to generate the XDS file.
  37. cscript convert.js ..\dtd\<dtdname>.xdr ..\dtd\<dtdname>.xds
  38. 6) Hand-edit the XDS file generated to include the correct VS7 intellisense
  39. annotations. At the time of writing these are known to include
  40. 1) Change the opening lines of the file
  41. <!--
  42. [XDR-XDS] This schema automatically updated from an IE5-compatible XDR schema to W3C
  43. XML Schema.
  44. -->
  45. <!DOCTYPE schema SYSTEM "xsd.dtd">
  46. <schema xmlns="http://www.w3.org/1999/XMLSchema" version="1.0">
  47. to
  48. <?xml version='1.0' ?>
  49. <schema targetNamespace='http://schemas.microsoft.com/Schemas/WMI20Ex'
  50. xmlns='http://www.w3.org/1999/XMLSchema' version="1.0"
  51. xmlns:wmi='http://schemas.microsoft.com/Schemas/WMI20Ex'>
  52. but note in the above the following DTD-specific content in xmlns:wmi declaration
  53. WMI20Ex, WMI20 or CIM20 - use this as last component of URL depending on DTD
  54. 2) All ref attributes on <element> which address CIM/WMI DTD items should
  55. have their values prefixed with "wmi:" e.g.
  56. <element ref="CLASSPATH">
  57. becomes
  58. <element ref="wmi:CLASSPATH">
  59. 3) All elements of the form
  60. <any namespace="##other"/>
  61. should be removed.
  62. 7) Check in the modified XDR and XDS files.