February 21, 2012 7:27:19 AM PST
Goal: How to Enable Detailed Taxonomy Validation via Interstage XWand API Fact: Interstage XWand Application Developer v11.x Fact: Interstage XWand Application Developer v12.0 Fix:Below is a sample code snippet that shows how to enable detailed taxonomy validation:
// create a new processor
XBRLProcessor xbrlProc = new XBRLProcessor();
//set the following XBRL processor property in XBRL Processor//com.fujitsu.xml.xbrl.xwand.processor.XBRLProperties.PERFORM_SCHEMA_VALIDATION=XBRLProperties.YES xbrlProc.setProperty(XBRLProperties.PERFORM_SCHEMA_VALIDATION, XBRLProperties.YES); Below is the excerpt from XWand XBRL v2.1 Java Doc on:com.fujitsu.xml.xbrl.xwand.processor.XBRLProperties.PERFORM_SCHEMA_VALIDATION A property for enabling or disabling detailed validation of XML documents with XML schemas. The value of the property is a java.lang.String. Possible values and their semantics are described in the table below. value description:
XBRLProperties.YES enabled
XBRLProperties.NO disabled Where 'detailed validation' means the complete validation of the XML documents, containing the validation of parts which are not stored to XBRL data model. This property is looked up when an XBRL document is loaded. XBRLProcessor.loadTaxonomySet(Source)
XBRLProcessor.loadTaxonomySet(Source[])
XBRLProcessor.loadTaxonomySet(Source[], Source[])
XBRLProcessor.appendTaxonomySet(TaxonomySet, Source)
XBRLProcessor.appendTaxonomySet(TaxonomySet, Source[])
XBRLProcessor.appendTaxonomySet(TaxonomySet, Source[], Source[])
XBRLProcessor.loadInstance(Source)
XBRLProcessor.loadInstance(TaxonomySet, Source)
See Also:
YES, NO, Constant Field Values Furthermore, just by the default loading of the schema file such as the following API call: //Reads taxonomy documents.
TaxonomySet taxonomySet = xbrlProc.loadTaxonomySet(new StreamSource(file)); You can expect the following possible exception concerning processing the schema file:
1: org.xml.sax.SAXException - upon an error during XML processing.XBRLProcessorException - if one of the conditions listed below applies.
2:The taxonomy source does not have a system ID value.
3: There were errors during XBRL document processing.
4: User-supplied error handler has thrown an exception. Author: C.Y. Chen
Attachment: