Skip to content

Typo in XML schema? #381

@JonasVautherin

Description

@JonasVautherin

Describe the bug

When I try to validate my file using the logback schema, it complains about line 782:

<xsd:pattern value="\$\{.+\}"/>

I use xmllint --schema logback.xsd my-file.xml, and the error is:

logback.xsd.xml:782: element pattern: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}pattern': The value '${.+}' of the facet 'pattern' is not a valid regular expression.
WXS schema /Users/user/Downloads/logback.xsd.xml failed to compile

Looking at the lines above, I see that none of them is escaping the $ sign. If I remove the \ in front of $ on line 782, then xmllint is happy:

                    <xsd:pattern value="($\{.+:-)?[Ww][Aa][Rr][Nn]\}?"/>
                    <xsd:pattern value="($\{.+:-)?[Ii][Nn][Ff][Oo]\}?"/>
                    <xsd:pattern value="($\{.+:-)?[Dd][Ee][Bb][Uu][Gg]\}?"/>
                    <xsd:pattern value="($\{.+:-)?[Tt][Rr][Aa][Cc][Ee]\}?"/>
                    <xsd:pattern value="$\{.+\}"/>

Could that be a typo in the schema?

Reproduction

xmllint --schema ~/Downloads/logback.xsd.xml logger-config.xml

Logs

No response

logback-android version

irrelevant

OS Version

irrelevant

What logback configuration are you using? (logback.xml or Java/Kotlin code)

Irrelevant. The problem is that the xml schema does not compile with `xmllint`.

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions