cansas1d XML header: Difference between revisions

From canSAS
(initial definition)
 
No edit summary
Line 1: Line 1:
= cansas1d/1.0 file header =
{| {{Tablestyle}}
{| {{Tablestyle}}
|-
|-

Revision as of 22:24, 14 April 2008

cansas1d/1.0 file header

Name Type occurrence Description Attributes
xml declaration header [1..1]
<?xml version="1.0"?>
Required first line of every well-formed XML file. version="1.0" refers to version 1.0 of the XML standard.
version="1.0"
stylesheet header [0..1]
<?xml-stylesheet type="text/xsl" href="example.xsl" ?>
Declares that example.xsl (needs to be in the local directory) will be the default stylesheet to an XML visualization tool. Change example.xsl to indicate a different stylesheet in the local directory. Refer to W3 Schools XSLT Help for assistance in constructing XSLT files.

XML rules actually allow for multiple stylesheet declarations. Explore this possibility as your own adventure.

type="text/xsl"
href="example.xsl"
SASroot container [1..1] The canSAS reduced 1-D SAS data (cansas1d/1.0) will be in the SASroot database.

(This is similar to NXroot used by NeXus.)

  • version="1.0" is required to identify the cansas1d/1.0 standard for SAS data.
  • xmlns sets the default namespace for all elements (with no prefix) in this file.
  • xmlns:xsi sets xsi as the prefix for any elements from the governing XML Schema.
  • xsi:schemaLocation associates a suggested URL (where the cansas1d/1.0 XML Schema might be found) with the default namespace string.
<SASroot version="1.0"
    xmlns="cansas1d/1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="cansas1d/1.0 http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd"
    >
version="1.0"
xmlns="{this-namespace-URI}"
xmlns:xsi="{URL-of-governing-XML-Schema}"
xsi:schemaLocation="{this-namespace-URI} {URL-to-find-XML-Schema}"