Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1883

Xinclude does not support space when the full path is expanded

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 3.0.1
    • None
    • XInclude
    • None
    • Windows

    Description

      Inside the function
      void XMLUri::initializePath(const XMLCh* const uriSpec)

      a check is made for the valid characters and the space is not included as a valid charater. Hence when the following xml is placed inside "c:\my path with space" directory

      <?xml version="1.0" encoding="utf-8"?>
      <objConf xmlns:xi="http://www.w3.org/2001/XInclude">
      <xi:include href="Constants.xml"/>
      ...

      the following error is reported:
      path contains invalid character ' '

      The solution is either to include the chSpace in the valid path character list (PATH_CHARACTERS) or add an extra condition to the "else if" part like this:

      else if (!isUnreservedCharacter(testChar) &&
      !isPathCharacter(testChar) &&
      testChar != chSpace )

      Attachments

        Activity

          People

            Unassigned Unassigned
            rpangeni Ramakanta Pangeni
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified