Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-15819

JSF XHTML Validator Ignores or Overrides Project-level XML Validation settings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.2.0.Alpha1
    • 4.1.1.Alpha1
    • jsf
    • None
    • Hide

      To reproduce:
      1) Start with an empty workspace (with JBDS 7.1 Beta 1 and SwitchYard Editor installed)
      2) Create a new SwitchYard project.
      3) Add a new Bean component (drag the Bean implementation from the palette onto the composite (blue box) on the canvas).
      4) Save the project.

      Though we by default turn off XML Validation on the new SwitchYard project, the XML validator is run and we find 3 or more errors off the bat.

      Show
      To reproduce: 1) Start with an empty workspace (with JBDS 7.1 Beta 1 and SwitchYard Editor installed) 2) Create a new SwitchYard project. 3) Add a new Bean component (drag the Bean implementation from the palette onto the composite (blue box) on the canvas). 4) Save the project. Though we by default turn off XML Validation on the new SwitchYard project, the XML validator is run and we find 3 or more errors off the bat.
    • Hide

      The only workaround we've found is to turn off XML File validation at the workbench level (i.e. Window->Preferences->XML->XML Files->Validation; turn off "Honour all XML schema locations") instead of the project level.

      Show
      The only workaround we've found is to turn off XML File validation at the workbench level (i.e. Window->Preferences->XML->XML Files->Validation; turn off "Honour all XML schema locations") instead of the project level.

      While testing the SwitchYard Editor, we have hit upon a strange error that occurs in a brand new workspace with JBDS 7.1 Beta 1 and the SwitchYard Editor installed.

      To reproduce:
      1) Start with an empty workspace (with JBDS 7.1 Beta 1 and SwitchYard Editor installed)
      2) Create a new SwitchYard project.
      3) Add a new Bean component (drag the Bean implementation from the palette onto the composite (blue box) on the canvas).
      4) Save the project.

      Though we by default turn off XML Validation on the new SwitchYard project, the XML validator is run and we find 3 or more errors off the bat.

      We believe this is due to the JSF XHTML validator. If we turn it off (Window->Preferences->Validation; find XHTML Syntax Validator in the list and uncheck "Build" and "Manual"), the errors go away (as they should). And depending on what OS you're on (Linux seems to do one thing, Windows another), you can turn the XHTML Syntax Validator back on and either not see the errors or see the errors on a manual validation.

      There are quite a few internal APIs used by the XHTML Validator, so we're not sure if that plays into it. Perhaps there's a static variable that doesn't get initialized properly until the validator is turned off and on during a workbench session. Or maybe this line should return null instead of the ValidationReport instance. :

      https://github.com/jbosstools/jbosstools-javaee/blob/master/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/XHTMLValidator.java#L150

      We really don't know. But it shouldn't interfere with the XML Validation settings considering that none of the files in the project are XHTML files and none of them seem to match the rules for the validator.

      The only workaround we've found is to turn off XML File validation at the workbench level (i.e. Window->Preferences->XML->XML Files->Validation; turn off "Honour all XML schema locations") instead of the project level.

            vrubezhny Victor Rubezhny (Inactive)
            bfitzpat_rh Brian Fitzpatrick (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: