Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-9060

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

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.4
    • Fix Version/s: None
    • Component/s: Library (Misc)
    • Labels:
      None

      Description

      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:b·="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>
      

        Attachments

          Activity

          Hide
          apm A. P. Marki added a comment -

          I see, when you say it's "explicitly allowed" by the spec, the spec actually says, "COLON ... and MIDDLE DOT are explicitly permitted."

          That's some spec they have over there.

          https://github.com/scala/scala-xml/pull/44

          Show
          apm A. P. Marki added a comment - I see, when you say it's "explicitly allowed" by the spec, the spec actually says, "COLON ... and MIDDLE DOT are explicitly permitted." That's some spec they have over there. https://github.com/scala/scala-xml/pull/44

            People

            • Assignee:
              apm A. P. Marki
              Reporter:
              mbeckerle.dfdl Michael Beckerle
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: