Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-2227

More detailed exception info for non whitespace text

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.7
    • None
    • Xalan-interpretive
    • None

    Description

      My code is tripping over these lines in org.apache.xalan.processor.StylesheetHandler:

      // If it's whitespace, just ignore it, otherwise flag an error.
      if (!XMLCharacterRecognizer.isWhiteSpace(ch, start, length))
      error(
      XSLMessages.createMessage(XSLTErrorResources.ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION, null),null);//"Non-whitespace text is not allowed in this position in the stylesheet!",

      }

      I'm not sure exactly why, since I can't see any funky whitespace in the stylesheet and the transform runs just fine from the command line. Doubtless it's a bug in my code somewhere I will eventually find and fix. That's not your fault or problem.

      However, it would help to me and others with similar problems to diagnose our bugs if the exception object or message offered some more details; i.e. which non-whitespace characters are being encountered that cause this problem? Just eyeballing the stylesheet in question I can't seem to figure that out.

      Attachments

        Activity

          People

            Unassigned Unassigned
            elharo@metalab.unc.edu elharo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: