You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Steve Lawrence (Jira)" <ji...@apache.org> on 2021/03/18 20:17:00 UTC

[jira] [Updated] (DAFFODIL-2475) Pattern facet regexs not restricted to only what XSD patterns allow

     [ https://issues.apache.org/jira/browse/DAFFODIL-2475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Lawrence updated DAFFODIL-2475:
-------------------------------------
    Summary: Pattern facet regexs not restricted to only what XSD patterns allow  (was: Pattern facet regtexs not restricted to only what XSD patterns allow)

> Pattern facet regexs not restricted to only what XSD patterns allow
> -------------------------------------------------------------------
>
>                 Key: DAFFODIL-2475
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2475
>             Project: Daffodil
>          Issue Type: Improvement
>          Components: Front End
>    Affects Versions: 3.0.0
>            Reporter: Mike Beckerle
>            Priority: Minor
>
>  
> Daffodil implements pattern facet regexs using the Java regex engine.
> The regex allowed by the XSD pattern facet are much more restrictive than what the Java regex engine accepts for syntax.
> There are even some incompatibilities (I think) where XSD pattern regexs allow subtraction from ranges: e.g., like [A-Z-[IO]] which means A through Z, without I nor O. This feature is not (need to double check) allowed by java regexs. 
> I'm not worried about implementing that feature very much, though it is nice.
> But for the most part the incompatibilities go the other way, where Java regex are more permissive and featureful. E.g., they have lookahead and lookbehind which XSD regexs don't support. They have modes like (?s) which enables "." to match line ending characters. XSD doesn't have that.
> It may be that if you turn on Xerces validation, but are using java-only constructs in the regex, that XSD doesn't support, that you will get an error from Xerces. (Need to verify) in which case I think that would lower the priority of this issue.
> I suggest one possible fix is a parser for this regex syntax that enforces only allowing what XSD allows in pattern regexs.
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)