List Info

Thread: conflicting attribute




conflicting attribute
user name
2006-06-24 12:04:15
Hi,

I am trying to put together a RELAX NG schema with a
namespace other 
than docbook which uses much of docbook.  In doing so I am
getting 
'conflicting ID-types for attribute "linkend"
of element "wopholLink" 
from namespace "http://ww
w.xmlmind.com/xmleditor/schema/sse'.

I can't work out why the conflict.  I also had a problem
with ID type in 
another attribute.  Jing points me to " <define
name="db._any"> 
<element>" within the docbook.rng file. 

Any ideas?  I tried excluding my namespace from the db._any
without 
success.  Not sure if this is a red herring...

Any help appreciated.

Thanks
Scott


Here are the relevant bits from the schema

<grammar ns="http://ww
w.xmlmind.com/xmleditor/schema/sse"
  xmlns:db="http://docbook.org/ns/d
ocbook"
  xmlnslink=
"http://www.w3.org/1999/x
link"
  xmlns="http://relaxng.or
g/ns/structure/1.0"
  datatypeLibrary="http://www
.w3.org/2001/XMLSchema-datatypes">

  <include
href="../docbook5xi_config/docbookxi.rng">
    <start>
      <ref name="element-scottsDoc"/>
    </start>

       <define
name="db.publishing.inlines">
      <choice>
        <choice>

        ....some commenting out of some inlines
          <ref name="wopholLinkxx"/>

        </choice>
        <ref name="db.glossary.inlines" />
        <ref name="db.coref" />
      </choice>
    </define>

  </include>

  <define name="element-scottsDoc">
    <element name="scottsDoc">
      <ref name="projectMemberType" />
        <ref name="element-introduction"
/>
    </element>
  </define>

  <define name="element-introduction">
    <element name="introduction">
      <choice>
        <oneOrMore>
          <ref name="db.section" />
        </oneOrMore>
        <oneOrMore>
          <ref name="db.para" />
        </oneOrMore>
      </choice>
    </element>
  </define>

  <define name="projectMemberType">
    ....
  </define>

  <define name="wopholLinkxx">
    <element name="wopholLink">
      <ref name="db.linkend.attribute"/>
    </element>
  </define>

</grammar>

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-helplists.oasis-open.org

conflicting attribute
user name
2006-06-24 14:32:28
Scott Daley wrote:

> I can't work out why the conflict.  I also had a
problem with ID type in 
> another attribute.  Jing points me to "
<define name="db._any"> 
> <element>" within the docbook.rng file.
> Any ideas?  I tried excluding my namespace from the
db._any without 
> success.  Not sure if this is a red herring...

Add the following inside <include .../>:

<define name="db._any">
       <element>
         <anyName>
           <except>
             <nsName/>
             <nsName ns="http://www.w3.org/1999/x
html"/>
             <nsName ns="...your
namespace..."/>
           </except>
         </anyName>
         <zeroOrMore>
           <choice>
             <ref
name="db._any.attribute"/>
             <text/>
             <ref name="db._any"/>
           </choice>
         </zeroOrMore>
       </element>
     </define>

Problem was, that you have defined attribute ID for your
element, but at 
the same time db._any defined all attributes as of type text
for all 
elements in other namespaces. You must exclude your
namespace from this 
general pattern.

				Jirka

-- 
------------------------------------------------------------
------
   Jirka Kosek     e-mail: jirkakosek.cz     http://www.kosek.cz
------------------------------------------------------------
------
   Profesionální školení a poradenství v oblasti technologií
XML.
      Podívejte se na náš nově spuštěný web http://DocBook.cz
        Podrobný přehled školení http://xmlguru.cz/skoleni/

------------------------------------------------------------
------
                    Nejbližší termíny školení:
        ** DocBook 15.-17.5.2006 ** XSL-FO 12.-13.6.2006 **
     ** XSLT 23.-26.10.2006 ** XML schémata 13.-15.11.2006
**
------------------------------------------------------------
------
   http://xmlguru.cz    Blog
mostly about XML for English readers
------------------------------------------------------------
------

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )