You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Martin Honnen <ma...@gmx.de> on 2023/04/18 20:53:31 UTC
Online form gives 404 on certain schema (it can't handle?)
Hi,
I am trying to use the online validator
https://www.softwarebytes.org/xmlvalidation/ to perform XSD 1.1
validation with Xerces but on a certain schema I only get a 404 when
submitting the form; here is the instance XML
<root>
<value>axyughji</value>
<value>axgh</value>
<value>agh</value>
<value>h</value>
<value>agHXU</value>
<value>axXgh</value>
<value>axxhu</value>
<value>AXYUGHJIA</value>
<value>ATXYUGHM</value>
</root>
and here is the schema:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element name="value" type="value-type" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="value-type">
<xs:restriction base="xs:string">
<xs:minLength value="0"/>
<xs:maxLength value="8"/>
<xs:assertion test="matches($value, '^[axyughji]{0,8}$', 'i')
and count(distinct-values(string-to-codepoints(lower-case($value)))) eq
string-length($value)"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
What do you think, is that a bug in the validator form, in the
underlying Xerces parser or in my schema (runs fine through Saxon EE
though)?
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
Re: Online form gives 404 on certain schema (it can't handle?)
Posted by Mukul Gandhi <mu...@apache.org>.
Hi Martin,
On Wed, Apr 19, 2023 at 2:23 AM Martin Honnen <ma...@gmx.de> wrote:
> I am trying to use the online validator
> https://www.softwarebytes.org/xmlvalidation/ to perform XSD 1.1
> validation with Xerces but on a certain schema I only get a 404 when
> submitting the form; here is the instance XML
>
> <root>
> <value>axyughji</value>
> <value>axgh</value>
> <value>agh</value>
> <value>h</value>
> <value>agHXU</value>
> <value>axXgh</value>
> <value>axxhu</value>
> <value>AXYUGHJIA</value>
> <value>ATXYUGHM</value>
> </root>
>
> and here is the schema:
>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>
> <xs:element name="root">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="value" type="value-type" maxOccurs="unbounded"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
>
> <xs:simpleType name="value-type">
> <xs:restriction base="xs:string">
> <xs:minLength value="0"/>
> <xs:maxLength value="8"/>
> <xs:assertion test="matches($value, '^[axyughji]{0,8}$', 'i')
> and count(distinct-values(string-to-codepoints(lower-case($value)))) eq
> string-length($value)"/>
> </xs:restriction>
> </xs:simpleType>
>
> </xs:schema>
>
> What do you think, is that a bug in the validator form, in the
> underlying Xerces parser or in my schema (runs fine through Saxon EE
> though)?
The above mentioned, XML Schema 1.1 validation is running fine from
XercesJ command line.
After bit of testing with, your XML Schema 1.1 validation use case as
mentioned above, I'm able to say that the use of XPath 2.0 function
string-to-codepoints within xs:assertion is most likely causing an
issue while using the site
https://www.softwarebytes.org/xmlvalidation/.
I'm still, not able to find how to solve this issue. I'll try to solve
this. But that may take little bit of time.
--
Regards,
Mukul Gandhi
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
Re: Online form gives 404 on certain schema (it can't handle?)
Posted by Bernd <ec...@zusammenkunft.net>.
We would need to see the server side exception which is turned into a 404
(which seems to be an odd error for a internal error) to answer this. It looks
ok (although it does not define a target namespace which is uncommon)
\--
http://bernd.eckenfels.net
* * *
**Von:** Martin Honnen <ma...@gmx.de>
**Gesendet:** Dienstag, April 18, 2023 10:53 PM
**An:** j-users@xerces.apache.org <j-...@xerces.apache.org>
**Betreff:** Online form gives 404 on certain schema (it can't handle?)
Hi,
I am trying to use the online validator
https://www.softwarebytes.org/xmlvalidation/ to perform XSD 1.1
validation with Xerces but on a certain schema I only get a 404 when
submitting the form; here is the instance XML
<root>
<value>axyughji</value>
<value>axgh</value>
<value>agh</value>
<value>h</value>
<value>agHXU</value>
<value>axXgh</value>
<value>axxhu</value>
<value>AXYUGHJIA</value>
<value>ATXYUGHM</value>
</root>
and here is the schema:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element name="value" type="value-type" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="value-type">
<xs:restriction base="xs:string">
<xs:minLength value="0"/>
<xs:maxLength value="8"/>
<xs:assertion test="matches($value, '^[axyughji]{0,8}$', 'i')
and count(distinct-values(string-to-codepoints(lower-case($value)))) eq
string-length($value)"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
What do you think, is that a bug in the validator form, in the
underlying Xerces parser or in my schema (runs fine through Saxon EE
though)?
\---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
\--------------------------------------------------------------------- To
unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org For additional
commands, e-mail: j-users-help@xerces.apache.org