XML validation

Discussion in 'XML' started by Stu, Mar 14, 2007.

  1. Stu

    Stu Guest

    I am getting the following wanring when I am trying to validate my XML
    file.

    line 9, I:\sm.xml:
    warning (652): element has more than one attlist declaration:
    ManagementClass


    Can somebody please tell me what I have to do in my DTD to make this
    warning go away.

    Below please find a copy of my DTD and XML file. Thanks in advance for
    all that answer this post

    <!DOCTYPE configuration [

    <!ELEMENT ASNODE ( #PCDATA ) >
    <!ELEMENT FileSpaceInfo ( #PCDATA ) >
    <!ELEMENT FileSpaceName ( #PCDATA ) >
    <!ELEMENT FileSpaceType ( #PCDATA ) >
    <!ELEMENT ManagementClass EMPTY >
    <!ATTLIST ManagementClass dirspec CDATA #REQUIRED >
    <!ATTLIST ManagementClass name NMTOKEN #REQUIRED >
    <!ELEMENT ReadBufferSize ( #PCDATA ) >
    <!ELEMENT SErvername ( #PCDATA ) >
    <!ELEMENT TCPPort ( #PCDATA ) >
    <!ELEMENT WriteBufferSize ( #PCDATA ) >
    <!ELEMENT asnode ( #PCDATA ) >

    <!ELEMENT configuration ( entity+ ) >
    <!ATTLIST configuration
    document CDATA #REQUIRED
    version CDATA #REQUIRED
    >


    <!ELEMENT enablearchiveretentionprotection ( #PCDATA ) >
    <!ELEMENT entity ( FileSpaceInfo | FileSpaceName | FileSpaceType |
    ManagementClass | ReadBufferSize | WriteBufferSize |
    tsm_connection_options )* >

    <!ATTLIST entity name NMTOKEN #REQUIRED >
    <!ELEMENT nodename ( #PCDATA ) >
    <!ELEMENT tcpserveraddress ( #PCDATA ) >
    <!ELEMENT tracefile ( #PCDATA ) >
    <!ELEMENT traceflags ( #PCDATA ) >
    <!ELEMENT tsm_connection_options ( ASNODE | SErvername | TCPPort |
    asnode | enab
    learchiveretentionprotection | nodename | tcpserveraddress | tracefile
    | traceflags )* >

    ]>

    <configuration document="TSM" version="1.0">

    <entity name='default'>
    <ReadBufferSize>65536</ReadBufferSize>
    <WriteBufferSize>65536</WriteBufferSize>
    <FileSpaceName>AXS-One</FileSpaceName>
    <FileSpaceType>AXSOne Data</FileSpaceType>
    <!DOCTYPE configuration [

    <entity name='default'>
    <ReadBufferSize>65536</ReadBufferSize>
    <WriteBufferSize>65536</WriteBufferSize>
    <FileSpaceName>AXS-One</FileSpaceName>
    <FileSpaceType>AXSOne Data</FileSpaceType>
    <FileSpaceInfo>AXSOne File Space</FileSpaceInfo>
    </entity>

    <entity name='windows'>
    <ManagementClass name='AXSMGMTCLASS-EV00' dirspec='/axsdata'></
    ManagementClass>
    <tsm_connection_options>
    <tcpserveraddress> 10.0.6.71 </tcpserveraddress>
    <nodename>alex2_solaris</nodename>
    <asnode>alex2 </asnode>
    <traceflags>appl</traceflags>
    <tracefile>mytrace.log</tracefile>
    </tsm_connection_options>
    </entity>

    <entity name='unix'>
    <ManagementClass name='AXSMGMTCLASS-EV00' dirspec='/axsdata'/>
    <tsm_connection_options>
    <SErvername>drs_engine11</SErvername>
    <ASNODE>alex2</ASNODE>
    <tcpserveraddress>10.0.6.71</tcpserveraddress>
    <TCPPort>1500</TCPPort>
    <enablearchiveretentionprotection>Yes</
    enablearchiveretentionprotection>
    <traceflags>api api_detail appl config timestamp
    verbdetail </trace
    flags>
    <tracefile>/log_dir/mytrace.log</tracefile>
    </tsm_connection_options>
    </entity>

    </configuration >
     
    Stu, Mar 14, 2007
    #1
    1. Advertising

  2. Stu schrieb:
    > I am getting the following wanring when I am trying to validate my XML
    > file.
    >
    > line 9, I:\sm.xml:
    > warning (652): element has more than one attlist declaration:
    > ManagementClass


    This is just a warning. It's nothing wrong.

    > Can somebody please tell me what I have to do in my DTD to make this
    > warning go away.


    [...]

    > <!ATTLIST ManagementClass dirspec CDATA #REQUIRED >
    > <!ATTLIST ManagementClass name NMTOKEN #REQUIRED >


    Put both attribute declarations into one list:

    <!ATTLIST ManagementClass
    dirspec CDATA #REQUIRED
    name NMTOKEN #REQUIRED
    >


    --
    Johannes Koch
    Spem in alium nunquam habui praeter in te, Deus Israel.
    (Thomas Tallis, 40-part motet)
     
    Johannes Koch, Mar 14, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page