Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   XML validation (http://www.velocityreviews.com/forums/t484323-xml-validation.html)

Stu 03-14-2007 07:51 PM

XML validation
 
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 >


Johannes Koch 03-14-2007 08:21 PM

Re: XML validation
 
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)


All times are GMT. The time now is 04:09 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.