source: 1dwg/trunk/doc/source/element_XML_header.rst @ 271

Last change on this file since 271 was 262, checked in by prjemian, 8 years ago

fixes #20, fixes #27

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision URL
File size: 2.8 KB

XML header

.. index:: ! XML header
None. This is the start of the XML file.
.. code-block:: guess
        <?xml version="1.0"?>
        <?xml-stylesheet type="text/xsl" href="cansasxml-html.xsl">
        <SASroot version="1.1"
line Description
1 declaration that this is an XML file, Some XML files have an additional attribute that is not part of the canSAS standard: encoding='UTF-8' that is not included since not all canSAS participants are comfortable supporting UTF-8 ( yet.

Optional :index:`XML Stylesheet` declaration to allow this XML file to display nicely in a (XSLT-compliant) WWW browser such as firefox. The XSLT file named as the argument of the href attribute (in this case: cansasxml-html.xsl) must be in the same directory as this XML file. (This requirement is part of the XSLT specification.) You can substitute a different XSLT file name to achieve a different formatted result. See for more help.


:ref:`SASroot <SASroot>` is the root element of the XML file. The version attribute is the version number of the canSAS standard to which this file has been written.


The order in which the attributes of any XML element appear is not important. An attribute may not be given twice in an element if the file conforms to the XML standard. Indentation is optional and is ignored by the XML support library.

4 Attribute declaring the default XML namespace.
5 Attribute defining xsi as the prefix to identify content tags in the XMLSchema-instance namespace.
6 & 7 Location of the XML Schema that defines the allowed tags for this XML file. This attribute has two strings within the quotations, separated by white space (a newline is acceptable). The first string is the XML namespace, repeated from above. The second string is a suggested name of the XML Schema file. Some XML support libraries will follow the URL shown here to retrieve the XML Schema from the canSAS server. Since this behavior is not guaranteed by the XML standard, don't count on it.
Note: See TracBrowser for help on using the repository browser.