Changeset 7956 for TI01-discovery-Ingest


Ignore:
Timestamp:
17/08/11 17:02:07 (8 years ago)
Author:
sdonegan
Message:

Finished undebugged final versio of the script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery-Ingest/trunk/v4.3.0/ingestAutomation-upgrade/OAIBatch/schematronValidateScript.py

    r7955 r7956  
    11from lxml import etree 
    2 import sys 
     2import sys,pdb 
    33 
    44#Simple script to provide XSLT transform sequence for schematron validation of NERC metadata 
     
    1818 
    1919#2. Transform the intermediate schema stylesheet with the iso svrl xslt 
    20  
     20isoSvrlforXslt = etree.parse('iso_svrl_for_xslt1.xsl') 
     21isoSvrlforXsltTransform = etree.XSLT(isoSvrlforXslt) 
     22theSchemaXsl = isoSvrlforXsltTransform(intermediate) 
    2123 
    2224#3. Transform the metadata XML using the generated schema from 2. 
     25xml = etree.parse(xmlToValidate) 
     26theSchemaXslTransform = etree.XSLT(theSchemaXsl) 
     27rawReport = theSchemaXslTransform(xml) 
    2328 
    2429 
    2530#4. Render the result into a more human readable validation report using 
     31svrlReportTxt = etree.parse('SvrlReportText.xslt') 
     32svrlReportTxtTransform = etree.XSLT(svrlReportTxt) 
     33textReport = svrlReportTxtTransform(rawReport) 
     34 
     35pdb.set_trace() 
Note: See TracChangeset for help on using the changeset viewer.