You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Mukul Gandhi (Jira)" <xe...@xml.apache.org> on 2021/08/01 08:24:00 UTC
[jira] [Commented] (XERCESJ-1730) XSD 1.1 assertions on list types
should be on typed value
[ https://issues.apache.org/jira/browse/XERCESJ-1730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17391114#comment-17391114 ]
Mukul Gandhi commented on XERCESJ-1730:
---------------------------------------
It seems to me that, there's some sort of issue with Xerces xs:assert XPath 2.0 function implementation for 'in-scope-prefixes'. For me just now, it returns nothing. If I write the following xs:assert alongside the assertion that you've specified, it doesn't fail,
<xs:assert test="count(in-scope-prefixes(.)) eq 0"/>
Also, if I rewrite the assertion you've specified as following, it doesn't fail (when I apply the validation, with the files you've attached),
<xs:assert test="every $prefix in (@exclude-result-prefixes[not(. = '#all')], @extension-element-prefixes)
satisfies ((if ($prefix = '#default') then '' else $prefix) = ('xs','dty','xml'))">
(i.e, I hardcode the prefix string sequence, on RHS)
Will explore further.
> XSD 1.1 assertions on list types should be on typed value
> ---------------------------------------------------------
>
> Key: XERCESJ-1730
> URL: https://issues.apache.org/jira/browse/XERCESJ-1730
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Structures
> Affects Versions: 2.12.1
> Environment: Windows
> Reporter: Priscilla Walmsley
> Priority: Minor
> Attachments: att-patterns-merge.xsl, schema-for-xslt30.xsd
>
>
> I am trying to use the XSD in the XSLT 3.0 specification and it contains the following assertion:
>
> {{ <xs:assert test="every $prefix in (@exclude-result-prefixes[not(. = '#all')],
> @extension-element-prefixes)
> satisfies ((if ($prefix = '#default') then '' else $prefix) = in-scope-prefixes(.))">}}
>
> I believe Xerces is treating the value of @exclude-result-prefixes like a single value rather than a list of strings. Every XSLT I have that has more than one value in @exclude-result-prefixes is supposedly violating this assertion.
> I initially thought this was an issue with the schema itself but Michael Kay pointed out this:
> "XSD 1.1 part 2 clause 4.3.13.3 says that in the XDM representation of the tree used for evaluation of an assertion, the atomization of the list-valued attribute @exclude-result-prefixes is the typed value, which is a sequence of tokens. So the tokenization has already been done, implicitly."
> So, I believe Xerces has a bug.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org