Project

Profile

Help

Custom Error Fields in XSD

Added by Stephan Jäger over 4 years ago

Hello,

i validate a XML against XSD. And it works. Is it possible to get appinfo like das:rule_text value or the other fields?

I'm working on .NET

I have rebuild the XSD File and insert saxon:message for error msg but the other infos i would get too.

Hope anyone can help me.

Greets Stephan

<xs:assert test="if(not(BEHANDLUNG/@value = (1,2)) and exists(ENDEDATUM/@value)) then false() else true()">
			<xs:annotation>
				<xs:appinfo>
					<das:rule_id value="60012"/>
					<das:rule_text value="ErrorMsg"/>
					<das:rule_type value="ERROR"/>
					<das:rule_fields>
						<das:field value="BEHANDLUNG"/>
						<das:field value="ENDEDATUM"/>
					</das:rule_fields>
				</xs:appinfo>
			</xs:annotation>
		</xs:assert>

Replies (2)

RE: Custom Error Fields in XSD - Added by Michael Kay over 4 years ago

Sorry, this information isn't currently available in any direct way. In fact, Saxon doesn't even retain xs:annotations in the compiled schema. I will think about whether we could do better.

RE: Custom Error Fields in XSD - Added by Stephan Jäger over 4 years ago

This would be very helpful.

Thank you for your efforts

    (1-2/2)

    Please register to reply