Search in sources :

Example 1 with NsPrefixInAttributeValues

use of org.oclc.purl.dsdl.svrl.NsPrefixInAttributeValues in project ph-schematron by phax.

the class PSXPathValidationHandlerSVRL method onStart.

@Override
public void onStart(@Nonnull final PSSchema aSchema, @Nullable final PSPhase aActivePhase, @Nullable final String sBaseURI) throws SchematronValidationException {
    final SchematronOutputType aSchematronOutput = new SchematronOutputType();
    if (aActivePhase != null)
        aSchematronOutput.setPhase(aActivePhase.getID());
    aSchematronOutput.setSchemaVersion(aSchema.getSchemaVersion());
    aSchematronOutput.setTitle(_getTitleAsString(aSchema.getTitle()));
    // Add namespace prefixes
    for (final Map.Entry<String, String> aEntry : aSchema.getAsNamespaceContext().getPrefixToNamespaceURIMap().entrySet()) {
        final NsPrefixInAttributeValues aNsPrefix = new NsPrefixInAttributeValues();
        aNsPrefix.setPrefix(aEntry.getKey());
        aNsPrefix.setUri(aEntry.getValue());
        aSchematronOutput.getNsPrefixInAttributeValues().add(aNsPrefix);
    }
    m_aSchematronOutput = aSchematronOutput;
    m_aSchema = aSchema;
    m_sBaseURI = sBaseURI;
}
Also used : SchematronOutputType(org.oclc.purl.dsdl.svrl.SchematronOutputType) NsPrefixInAttributeValues(org.oclc.purl.dsdl.svrl.NsPrefixInAttributeValues) Map(java.util.Map)

Aggregations

Map (java.util.Map)1 NsPrefixInAttributeValues (org.oclc.purl.dsdl.svrl.NsPrefixInAttributeValues)1 SchematronOutputType (org.oclc.purl.dsdl.svrl.SchematronOutputType)1