Skip to content

ConstructingParser does not accept U+00B7 character in namespace prefix #9060

Closed
@scabug

Description

@scabug

This unicode character U+00B7 is explicitly allowed by the XML spec as a character in a namespace prefix, but this fails to parse (that middle-dot character is the U+B7).

This problem is in the ConstructingParser, but does not exist in the regular XML loader.

Here's an XML doc that illustrates the problem:

<?xml version="1.0" encoding="UTF-8"?> 
<!-- Note that in b· that middle dot is exactly that. Unicode 0xB7. -->
<!-- This middle doc character is expressly allowed by XML 1.0 syntax for namespace prefixes. -->
<имен:schema 
xmlns:имен="http://www.w3.org/2001/XMLSchema" 
xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" 
xmlns:="http://example.com" 
targetNamespace="http://example.com">

  <имен:include schemaLocation="xsd/built-in-formats.xsd"/>
      
  <имен:annotation>
    <имен:appinfo source="http://www.ogf.org/dfdl/">
      <dfdl:format ref="b·:daffodilTest1" separator="" alignment="1" alignmentUnits="bytes" lengthUnits="bytes"
        trailingSkip="0" initiator="" terminator="" leadingSkip='0' textTrimKind="none" initiatedContent="no"
        ignoreCase="no" representation="text" textNumberRep="standard" encoding="ASCII"/>
    </имен:appinfo>
  </имен:annotation>
  
    <имен:simpleType name="simTyp" dfdl:lengthKind="delimited" dfdl:initiator="1:">
      <имен:restriction base="имен:int"/>
    </имен:simpleType>

    <имен:element name="one" type="b·:simTyp"/>
  
</имен:schema>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions