Jumps: reg-dm mail archive :: RegUpgradeToV10 :: ResourceMetadata :: RegistryInterface :: VOResourceV10 :: RegUpgradeSummer2006
Meetings: InterOpMay2006ResReg :: InterOpSep2006ResReg

VOResource XSL Conversion Stylesheets

For v1.02 (Release Cand. 11):

XSL stylesheet for converting v0.10 to v1.0 records. (Updated 17 April 2007)

This stylesheet requires an XSLT 2.0 processor, such as the Saxon engine, available in saxon8.jar. To run, type:

java -jar saxon8.jar resource-v0.10.xml VOResource-v0.10-v1.0.xsl2 > resource-v1.0.xml

where resource-v0.10.xml is the v0.10 resource record to convert.


  • If you notice any problems let RayPlante know
  • I have not yet plugged in support for CEA
    • I have attached a preliminary xslt focussed on transforming CEAApplicationType and CEAServerType entries only - It works with the element wrapping that is present in output from the Astrogrid v.10 registry -- PaulHarrison - 23 Apr 2007
  • When you process a registry record, a warning message is generated indicating that you must update certain information "by hand".
  • The created and updated attributes are now required by the VOResource core schema; if they are not set in the input document, a dummy value will be inserted and a warning message generated.

Input Parameters

The stylesheet supports a number of input parameters that can be set on the saxon command line, for example,

java -jar saxon8.jar resource-v0.10.xml VOResource-v0.10-v1.0.xsl2 setSchemaLocation=1 schemaLocationPrefix=/home/user/schemas/ > resource-v1.0.xml

The parameters are as follows:

If true, insert carriage returns and indentation to produce a neatly formatted output. If false, any spacing between tags in the source document will be preserved. (default: false).
the per-level indentation. Set this to a sequence of spaces when pretty printing is turned on.
The prefix to prepend to schema files listed in the xsi:schemaLocation(if used). The value should include a trailing slash as necessary. The default is an empty string, which indicates the current working directory (where output is used). Note that the xsi:schemaLocation is only set if it is set on the input.
Set to 1 if the xsi:schemaLocation should be set or zero if it should not be. If not set at all (default), xsi:schemaLocation is only set if it is set on the input.
Set to 0 or greater if a default validationLevel should set as all possible locations. If greater than -1, the value will be the value of the validationLevel. You must also provide an ID to the validatedBy parameter below in order for the level to be set.
If set, the updated atribute will be set to this value
If set, the output document will have a root element of this name and a namespace given by $resourceNS and it will contain the VOResource metadata; all other wrapping elements from the input will be filtered out. The default setting will produce records that can be inserted directly into a Harvest response record.
If resourceName is set (with an non-empty value), the output document will have a root element of $resourceName and a this namespace. It will contain the VOResource metadata; all other wrapping elements from the input will be filtered out.

Release Notes: Changes since Dec 2006 release

  • add time half to created/updated if missing
  • eliminate Z from created/updated dates
  • don't add default time to created/updated
  • add today parameter
  • add namespaces for DataCollection types
  • CircleRegion -> Circle; fix capture of center; unit on radius
  • Registry: spacing issues on comments
  • Registry: no resultType
  • Registry: add extensionSearchSupport default
  • bug fix for TabularSkyService: define vr, set correct prefix for CatalogService.
  • bug fix for coverage: avoid missing spatial frame part of ID
  • add xlink definition at top of file if necessary
  • set role="std" for ConeSearch & SIA
  • set Resource to RI namespace (if desired)
  • uniquify STC ids
  • need conditional tests in stc templates with mode="pos"

Deprecated Versions

An update of the earlier released XSLTv1.0 stylesheet is also available, but deprecated as it does not set namespace declarations properly (and includes no

-- RayPlante - 17 April 2007

Topic attachments
I Attachment History Action Size Date Who Comment
XSL (XML style sheet)xsl CEA_UpdateTo1.0.xsl r1 manage 11.8 K 2007-04-23 - 13:06 PaulHarrison xslt stylesheet to convert CEA instances from V.10
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2007-04-23 - PaulHarrison
This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback