Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3537

TagLibraryConfig doesn't recognize <facelet-taglib><description>

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.7
    • 2.0.14, 2.1.8
    • General
    • None
    • Windows 7 x64, JDK 1.7.0_4, Eclipse Indigo SR2, Tomcat 7.0.27, MyFaces 2.1.7

    Description

      The trigger is this OmniFaces issue: http://code.google.com/p/omnifaces/issues/detail?id=9

      OmniFaces has a <description> element right before <namespace> element in the taglib.xml files which describes the taglib.

      <facelet-taglib id="o"
      xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
      version="2.0"
      >
      <description>OmniFaces UI components.</description>
      <namespace>http://omnifaces.org/ui</namespace>

      ...
      </facelet-taglib>

      It get parsed fine on Mojarra, but on MyFaces 2.1.7 the following exception occurs:

      Caused by: org.xml.sax.SAXException: Error Handling [jar:file:/C:/Users/BalusC/Documents/Work/M4N/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp2/wtpwebapps/omnifaces_test/WEB-INF/lib/omnifaces.jar!/META-INF/omnifaces-ui.taglib.xml@20,33] <description>
      at org.apache.myfaces.view.facelets.compiler.TagLibraryConfig$LibraryHandler.endElement(TagLibraryConfig.java:609)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:606)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1741)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2898)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
      at org.apache.myfaces.view.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:788)
      ... 37 more

      Removing the <description> element solves the problem. But this is not what we want. Putting the <description> element after the <namespace> element also solves the problem, but Eclipse marks the XML invalid according the XSD.

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            balusc Bauke Scholtz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: