Building HDDM support software

From GlueXWiki
Jump to: navigation, search

Part I

  • would like to avoid inconsistency between event.xsd and hddm_s.c, .h
    • .c and .h are made from the .xsd
    • currently both are checked in
      • as well as event.xml (we are triply redundant)
    • tools for building .c and .h are not generally created (expert-only operation)
    • because of checkout order, makefile can fail
  • standard solution: check out the authority, make the dependent file
    • need to build the tools to do this
  • objection to standard solution: package creep
    • everyone would need the software to build this
    • what is needed?
      • yum install perl-XML-Xerces
      • yum install xalan-c
  • schema is authority
    • outside world sees w3c standard
    • schema can be richer than hddm
    • hddm much easier to work with
      • introduces merging problem
      • current schema does not take advantage of this
      • cross that bridge when we come to it

Part II

  • Talked to Richard: he is OK with making the hddm template (event.xml) the authoritative file
  • If we do that we can "make" hddm_s.h, .c using only xerces
  • Xerces is installed by everyone anyway: no package creep
  • Can still make XML schema (event.xsl) from event.xml without loss of information given current status of schema.
    • This would still be an "expert" operation
    • Needs Xalan
    • Nothing we do not depends on the schema

Why Xalan needed?

  • hddm template to xml schema done with XSLT, a XML/W3C transformation standard
  • taking one XML description of the format and translating it to another XML description of the format
  • an .xsl file is needed to provide the recipe (itself an XML file)
  • not the same as coding the transformation (xerces useful for that)