[NeXus-tech] merge xslt/NXobject.xsd with ...

Akeroyd, FA (Freddie) freddie.akeroyd at stfc.ac.uk
Wed Dec 3 10:44:11 GMT 2008


Hi,

The answer is probably "a bit of both" - nxdl.xsd and NeXus.xsd have
different roles and both will be needed.

nxdl.xsd is used to check a *.nxdl.xml file has the correct layout and
is referencing valid types. At the nxdl level there is no "data" i.e. we
are saying an element will later contain data of type NX_FLOAT, but are
not actually writing NX_FLOAT values to the nxdl file; thus nxdl.xsd
needs to know that "NX_FLOAT" is a supported type, but probably does not
need to know it represents xsd:float in an instance document - the xsd
file created from the nxdl by xslt will need to know this though. The
only time it would need to know about real type information is if we
wanted to validate default or fixed values specified in the nxdl file
i.e. check that 4.0 is a valid NX_FLOAT in

<field name="something" type="NX_FLOAT" fixed="4.0">

However I'm not sure such an attribute check could be done in nxdl.xsd,
but could certainly be done during the ndx2xsd.xsl translation. BTW I'm
not sure where we left "default" values for elements. "fixed" works
fine, but for default to work would require the API that reads the NeXus
XML instance file to be "schema aware" so as to return a default value
when none was specified in the parsed instance document. A step too far
for now?

My feeling is that the information about types that appear in the final
XML instance document should go into NeXus.xsd and that about types only
relevant to NXDL into nxdl.xsd (which may need to include NeXus.xsd) The
xsd files generated by nxdl2xsd only needs to refer to NeXus.xsd as all
nxdl specific constructs will have been removed during the convertion.
It may be we just need to rename NeXus.xsd to NXobject.xsd and then it
would fit in with the current include scheme

Regards,

Freddie

-----Original Message-----
From: nexus-tech-bounces at nexusformat.org
[mailto:nexus-tech-bounces at nexusformat.org] On Behalf Of Pete Jemian
Sent: 02 December 2008 22:31
To: NeXus Technical sub-committee list
Subject: [NeXus-tech] merge xslt/NXobject.xsd with ...


At the recent tech meeting, we agreed that xslt/NXobject.xsd was extra.
With which existing schema should it merge?
    base_classes/nxdl.xsd
or
    schema/NeXus.xsd

-- 
----------------------------------------------------------
  Pete R. Jemian, Ph.D.                <jemian at anl.gov>
  Beam line Controls and Data Acquisition, Group Leader
  Advanced Photon Source,   Argonne National Laboratory
  Argonne, IL  60439                   630 - 252 - 3189
-----------------------------------------------------------
     Education is the one thing for which people
        are willing to pay yet not receive.
-----------------------------------------------------------


_______________________________________________
NeXus-tech mailing list
NeXus-tech at nexusformat.org
http://lists.nexusformat.org/mailman/listinfo/nexus-tech
-- 
Scanned by iCritical.



More information about the NeXus-tech mailing list