XSD regex: Why is this not working when parsed into HTML with an XSLT?

pyeastinsnym

New Member
I have an XML file that is "well formed and valid" (matched with an XSD schema, tested at http://xsdvalidation.utilities-online.info/).

I am using these lines of code in the XSD to restrict the XML input of a \[code\]<firstname>\[/code\]:\[code\]<xsd:pattern value = "http://stackoverflow.com/questions/11181030/[A-Z][a-z]+" /><xsd:minLength value = "http://stackoverflow.com/questions/11181030/2" /><xsd:maxLength value = "http://stackoverflow.com/questions/11181030/25" />\[/code\]
So, the website mentioned above will throw an error and not validate when the \[code\]<firstname>\[/code\] does not match this regex and length restrictions (say, if I enter "5" as the first name in the XML file).

But, when I open the XML file into Firefox (parsed into HTML with an XSL file), it does not throw an error and will display whatever is entered into the XML file regardless of the regular expression and length restrictions.

Are XSD schemas not meant to be used in this way, to error check in web browsers? Do I need to use the restrictions in the XSLT instead of the XSD?
 
Back
Top