Project

Profile

Help

Bug #1485

closed

XSD 1.1 saxon:preprocess does not actually preprocess

Added by Priscilla Walmsley about 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Saxon extensions
Sprint/Milestone:
-
Start date:
2012-04-19
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

I am not able to get the saxon:preprocess facet to work. It seems to recognize that it is an allowed element in the content model of , but it does not do the preprocessing or validate my document.

Below is the example I used, similar to the one in the Saxon documentation. I also tried upper-case(.), various other built-in functions, and namespace prefixes on the upper-case function.

Schema: (newsch3.xsd)

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

       xmlns:saxon="http://saxon.sf.net/">

<xs:element name="newSize" type="SMLXSizeType"/>

<xs:simpleType name="SMLXSizeType">

<xs:restriction base="xs:token">

  <saxon:preprocess action="upper-case($value)"/>

  <xs:enumeration value="SMALL"/>

  <xs:enumeration value="MEDIUM"/>

  <xs:enumeration value="LARGE"/>

  <xs:enumeration value="EXTRA LARGE"/>

</xs:restriction>

</xs:simpleType>

</xs:schema>

Instance:

<newSize xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="newsch3.xsd">small

Output:

The content "small" of element does not match the required simple type. Value

"small" contravenes the enumeration facet "EXTRA LARGE, LARGE, MEDIUM, SM..." of the type

SMLXSizeType (See http://www.w3.org/TR/xmlschema11-2/#cvc-datatype-valid clause 1)

Validation error on line 2 column 61 of EX83a_1.xml:

XQDY0027: One or more validation errors were reported

Please register to edit this issue

Also available in: Atom PDF