Search in sources :

Example 1 with NsPrefixInAttributeValues

use of com.helger.schematron.svrl.jaxb.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(com.helger.schematron.svrl.jaxb.SchematronOutputType) NsPrefixInAttributeValues(com.helger.schematron.svrl.jaxb.NsPrefixInAttributeValues) Map(java.util.Map)

Aggregations

NsPrefixInAttributeValues (com.helger.schematron.svrl.jaxb.NsPrefixInAttributeValues)1 SchematronOutputType (com.helger.schematron.svrl.jaxb.SchematronOutputType)1 Map (java.util.Map)1