test123456789
New Member
I'm having difficulty validating an SXD schema combined with Schematron.Following the steps described in this guide I've incorporated schematron between the \[code\]<xs:appinfo>\[/code\] tags in an XSD document as follows:\[code\]<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="Test"> <xs:annotation> <xs:appinfo> <schattern name="Testing schematron" xmlns:sch="http://purl.oclc.org/dsdl/schematron"> <sch:rule context="Test"> <sch:assert test="@Attribute1">Attribute 1 exists</sch:assert> </sch:rule> </schattern> </xs:appinfo> </xs:annotation> <xs:complexType> <xs:attribute name="Attribute1" type="xs:string" use="optional"/> <xs:attribute name="Attribute2" type="xs:string" use="optional"/> </xs:complexType> </xs:element></xs:schema>\[/code\]This document is supposed to test (or validate) the document\[code\]<?xml version="1.0" encoding="ISO-8859-1"?><Test Attribute1="attr1"/>\[/code\]using the simple xsltproc-based script listed on the schematron page. Unfortunately, I'm getting the following error message at the last step of the script.\[code\]step3.xsl:13: parser error : Extra content at the end of the documentplates select="*|comment()|processing-instruction()" mode="M0"/></axsl:template> ^cannot parse step3.xsl\[/code\]I'd appreciate help figuring out the cause of this error.