cansas1d documentation: Difference between revisions

From canSAS
(XML file header adjusted)
Line 12: Line 12:
<pre>
<pre>
<?xml version="1.0"?>
<?xml version="1.0"?>
<SASroot xmlns="http://www.smallangles.net/cansas1d"
<SASroot version="1.0">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
</pre>
xsi:schemaLocation="http://www.smallangles.net/cansas1d http://www.smallangles.net/cansas1d/cansas1d.xsd"
 
version="1.0">
===alternative XML file header (referencing a stylesheet)===
<pre>
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="example.xsl" ?>
<SASroot version="1.0">
</pre>
</pre>


Line 124: Line 128:
==Validation of XML against the Schema==
==Validation of XML against the Schema==
# open browser to:  http://www.xmlvalidation.com/
# open browser to:  http://www.xmlvalidation.com/
# paste content of candidate XML file into the form and press <validate>
# paste content of candidate XML file into the form
# replace standard canSAS1D XML header with canSAS1D XML Schema validation header (see below)
# press <validate>
# paste content of [[cansas1d.xsd]] XSD file into form and press <continue validation>
# paste content of [[cansas1d.xsd]] XSD file into form and press <continue validation>
# check the results
# check the results
==alternative XML header for validating against the XML Schema==
<pre><?xml version="1.0"?>
<SASroot xmlns="http://www.smallangles.net/cansas1d"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.smallangles.net/cansas1d/ http://www.smallangles.net/cansas1d/1.0/cansas1d.xsd"
version="1.0">
</pre>

Revision as of 19:26, 11 January 2008

Disclaimer

This description is meant to inform the community how to layout the information within the XML files. However, should the information in this document and the canSAS 1D SAS XML Schema differ, the XML Schema will be deemed to have the most correct description of the standard.

General Layout of the XML Data

required XML file header

<?xml version="1.0"?>
<SASroot version="1.0">

alternative XML file header (referencing a stylesheet)

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="example.xsl" ?>
<SASroot version="1.0">

overall file: layout of SASroot

  • SASroot
    • SASentry
    • SASentry
    • SASentry ... (for each data set, time-slice, step in a series, new sample, etc.)

each data set: layout of the SASentry

  • SASentry
    • Title
    • Run
    • SASdata (this is where the reduced 1-D SAS data is stored)
    • SASsample
    • SASinstrument
    • SASprocess
    • SASprocess
    • SASprocess... (for each processing or analysis step)
    • SASnote
    • SASnote
    • SASnote... (anything at all)

Definition of terms

term
quantity
description
aperture
[0..inf]
describes an aperture position, size, and shape
beam_center
[..]
beam_shape
[..]
beam_size
[..]
date
[..]
description
[..]
details
[..]
distance
[..]
I
[..]
ID
[..]
Idata
[..]
Idev
[..]
name
[..]
offset
[..]
orientation
[..]
pitch
[..]
pixel_size
[..]
Q
[..]
Qdev
[..]
Qfwhm
[..]
Qmean
[..]
radiation
[..]
roll
[..]
Run
[..]
SAScollimation
[..]
SASdetector
[..]
SASentry
[1..inf]
Describes a single 1-D SAS data scan.
Time-resolved experiments or others with series data should put each step in the series into its own SASentry.
SASinstrument
[1..1]
describes the SAS instrument used to provide this SASentry
SASnote
[0..inf]
allows for other information to be added to a SASentry
SASprocess
[0..inf]
describes a data processing or analysis step
SASprocessnote
[..]
SASroot
[1..1]
(required) root node of the canSAS 1-D reduced SAS data file in XML
SASsample
[1..1]
describes the sample
SASsource
[..]
SDD
[..]
Shadowfactor
[..]
size
[..]
temperature
[..]
term
[..]
thickness
[..]
Title
[..]
transmission
[..]
wavelength_max
[..]
wavelength_min
[..]
wavelength_spread
[..]
wavelength
[..]
x
[..]
y
[..]
yaw
[..]
z
[..]

attributes

name
type
unit
version

rules

  1. no whitespace padding of value fields
  2. Q=(4 π / λ) sin(θ)
    where λ is the wavelength of the radiation and 2θ is the angle through which the detected radiation has been scattered.
  3. units to be given in standard SI abbreviations (eg, m, cm, mm, nm, K) with the following exceptions:
    1. um=micrometres
    2. C=celsius
    3. A=Angstroms
    4. percent=%.
    5. fraction
    6. a.u.=arbitrary units
    7. none=no units are relevant (such as dimensionless)
  4. where reciprocal units need to be quoted the format shall be "1/abbreviation"
  5. Unicode characters MUST NOT be used
  6. axes:
    1. z is along the flight path (positive value in the direction of the detector)
    2. x is orthogonal to z in the horizontal plane (positive values increase to the right when viewed towards the incoming radiation)
    3. y is orthogonal to z and x in the vertical plane (positive values increase upwards)
  7. angles:
    1. roll is about z
    2. pitch is about x
    3. yaw is about y

Validation of XML against the Schema

  1. open browser to: http://www.xmlvalidation.com/
  2. paste content of candidate XML file into the form
  3. replace standard canSAS1D XML header with canSAS1D XML Schema validation header (see below)
  4. press <validate>
  5. paste content of cansas1d.xsd XSD file into form and press <continue validation>
  6. check the results

alternative XML header for validating against the XML Schema

<?xml version="1.0"?>
<SASroot xmlns="http://www.smallangles.net/cansas1d"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.smallangles.net/cansas1d/ http://www.smallangles.net/cansas1d/1.0/cansas1d.xsd"
	version="1.0">