Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » [SOLVED] Attribute 'attrname' is not allowed to appear in element 'elem'
[SOLVED] Attribute 'attrname' is not allowed to appear in element 'elem' [message #634043] Wed, 20 October 2010 11:24
leniviy  is currently offline leniviy
Messages: 8
Registered: October 2009
Junior Member
Q:
Attribute 'attrname' is not allowed to appear in element 'elem', XML Catalog
A:
1) Eclipse is right, fix your XML
2) If you really need to keep this bad xml, download the xsd, add missing attr into it, go to preferences, XML Catalog,
add your modified xsd there
key type: Namespace Name
key : the original xsd url (if xsi:schemaLocation="a b", use "b" or try both)

Real life example, jboss tools installed, pages.xml :
<?xml version="1.0" encoding="UTF-8"?>
<pages xmlns="http://jboss.com/products/seam/pages"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd"
       login-view-id="/login.xhtml" no-conversation-view-id="/login.xhtml" >
...
    <page view-id="/pages/foo.xhtml" login-required="true" on-postback="false">
        <rewrite pattern="/foo"/>
    </page>
...

validation error: Attribute 'on-postback' is not allowed to appear in element 'page'. pages.xml

1) I download http://jboss.com/products/seam/pages-2.2.xsd
2) find node and add missing attribute "on-postback"
    <xs:attributeGroup name="attlist.page">
        <xs:attribute name="on-postback" default="true" type="pages:tf-boolean"/>
        <xs:attribute name="action" type="xs:token" />

3) Add modified pages-2.2.xsd with key: http://jboss.com/products/seam/pages-2.2.xsd
Previous Topic:Nested lib folder structure at deployment on JBoss AS 5.1 in server view
Next Topic:Throwing an exception from a web service
Goto Forum:
  


Current Time: Sun Oct 26 02:58:04 GMT 2014

Powered by FUDForum. Page generated in 0.01538 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software