XML Schema with String pattern gives error only in author mo
Posted: Fri Dec 25, 2009 11:21 pm
Here is a simple example which produces an error in author mode, bud is valid in text mode:
Stylesheet.css:
Schema.xml:
(xml.xsd in same directory)
Test XML Document:
When looking at the Text XML document in text-mode, everything is ok. But when switching to author mode, there is an error: "... not facet-valid with respect to pattern ...". The error goes away if reducing the length of the text (cutting one 'This is a test. " away). This problem is present since I am using OxygenXML (2 Years?)
Thanks in advance for checking that.
Max Renkin
Stylesheet.css:
Code: Select all
@charset "UTF-8";
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xs:element name="SCRIBBLE">
<xs:complexType>
<xs:sequence>
<xs:element name="PROBLEM_DEMO">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value=".*\S\S\S.*"/>
<!--xs:whiteSpace value="collapse"></xs:whiteSpace-->
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Test XML Document:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="Stylesheet.css" type="text/css"?>
<SCRIBBLE xsi:noNamespaceSchemaLocation="Schema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<PROBLEM_DEMO>This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a</PROBLEM_DEMO>
</SCRIBBLE>
Thanks in advance for checking that.
Max Renkin