[SOLVED] Attribute 'attrname' is not allowed to appear in element 'elem' [message #634043] |
Wed, 20 October 2010 11:24 |
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
|
|
|
Powered by
FUDForum. Page generated in 0.02553 seconds