微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

xml – 我在哪里可以找到wddx.dtd的副本?

我有一个涉及解析wddx webservice响应的项目​​. DOM DocumentBuilder抛出一个异常,即 XML没有引用dtd,因此格式错误.我插入了一个DOCTYPE语句,现在它抛出一个格式错误 – 无法找到协议.我很确定这是我对DTD的引用,现在我需要一个本地副本.我认为从wddx.org获取DTD是一个简单的冲浪,然而,这并没有成功.

解决方法

不确定它是否是最新的,但我发现了 this reference on xml.coverpages.org,它与 a local archive copy of the DTD相关联

WDDX DTD From:
07002
Date: 1998-09-28

<!-- ************************************************************************
     WDDX DTD:

     Author: Simeon Simeonov (simeons@allaire.com)

     copyright (c) 1998 Allaire Corp. http://www.allaire.com
-->

<!-- ************************************************************************
     Introductory Notes:


     What is WDDX:

     WDDX stands for Web distributed Data eXchange. WDDX is a mechanism for
     exchanging complex data structures between programming languages. It
     has been designed with web applications in mind. WDDX consists of a 
     language-independent representation of instantiated data based on 
     XML 1.0 (which is defined using this DTD) and a set of serializer/
     deserializer modules for every language/technology that uses WDDX.

     The WDDX DTD:

     The WDDX DTD can be used to validate WDDX packets. Packets are
     representations of instantiated data structures in programming 
     languages. The following is an example of a WDDX packet:

          <?xml version='1.0'?>
          <!DOCTYPE wddxPacket SYstem 'wddx_0090.dtd'>
          <wddxPacket version='0.9'>
             <header/>
             <data>
                 <struct>
                     <var name='s'>
                         <string>a string</string>
                     </var>
                     <var name='n'>
                         <number>-12.456</number>
                     </var>
                     <var name='d'>
                         <dateTime>1998-06-12T04:32:12</dateTime>
                     </var>
                     <var name='b'>
                         <boolean value='true'/>
                     </var>
                     <var name='a'>
                         <array length='2'>
                             <number>10</number>
                             <string>second element</string>
                         </array>
                     </var>
                     <var name='obj'>
                         <struct>
                             <var name='s'>
                                 <string>a string</string>
                             </var>
                             <var name='n'>
                                 <number>-12.456</number>
                             </var>
                         </struct>
                     </var>
                     <var name='r'>
                        <recordset rowCount='2' fieldNames='NAME,AGE'>
                            <field name='NAME'>
                                <string>John Doe</string>
                                <string>Jane Doe</string>
                            </field>
                            <field name='AGE'>
                                <number>34</number>
                                <number>31</number>
                            </field>
                        </recordset>
                     </var>
                 </struct>
             </data>
         </wddxPacket>

     It defines a root level object that is a structure (also kNown as 
     an associative array) of six properties:

     - s which is the string 'a string',- n which is the number -12.456,- d which is the date-time value June 12,1998 4:32:12am,- b which is the boolean value true,- a which is an array of two elements (10 and 'second element'),- obj which is a structure with two properties s and n,and
     - r which is a recordset of two rows with fields NAME and AGE.

     Basic data types:

     WDDX supports the following basic data types: boolean (true/false),number,date-time,and string. 

     Numbers are internally represented with floating point numbers. Because 
     of differences between WDDX-enabled languages,the range of numbers has 
     been restricted to 3.4E+/-38. The precision has been restricted to 7 
     digits after the decimal point. These requirements are consistent with 
     a 4-byte floating point representation.

     Date-time values are encoded according to the full form of ISO8601. 
     Timezone information will be successfully parsed and used to convert to
     a local data-time value. Efforts should me made to ensure that the 
     internal representation of date-time values does not suffer from Y2K
     problems and covers a sufficient range of date-time values.

     Strings can be of arbitrary length and must not contain embedded nulls.

     Complex data types:

     WDDX supports the following complex data types: arrays,structures,and 
     recordsets.

     Arrays are integer-indexed collections of objects of arbitrary type. 
     The starting index value is usually 0 with the notable exception of 
     CFML whose arrays have an initial index value of 1. Because of these
     differences working with array indices can lead to non-portable data.

     Structures are string-indexed collections of object of arbitrary type.
     In many languages they are kNown as associative arrays. Structures
     contain one or more variables. Because some of the languages supported
     by WDDX are not case-sensitive,no two variable names can differ only
     by their case.

     Recordsets are tabular data encapsulations: a set of named fields with 
     the same number of rows of data. Only simple data types can be stored in
     recordsets. For tabular data storage of complex data types,an array of 
     structures should be used. Because some of the languages supported by 
     WDDX are not case-sensitive,no two field names can differ only by 
     their case.

     Data type comparisons:

     The following table compares the basic WDDX data types with those of 
     languages/technologies commonly used on the Web.

     WDDX Type         COM              Java Type           ECMAScript Type   
     **************    *************    ****************    ***************   
     boolean           boolean          boolean             boolean           
     number            float?           float?              number            
     dateTime          DATE             ??                  Date              
     string            BSTR             java.lang.String    string            
     array             VARIANT array    ??                  Array             
     struct            IWDDXStruct      ??                  Object            
     recordset         IWDDXRecordset   ??                  WddxRecordset     


     More on data types:

     WDDX provides no notion of a null object. Null objects should be 
     serialized to empty strings. Upon deserialization it is up to the
     component performing the operation to determine whether and where 
     should empty strings be deserialized to null values. 

     WDDX serializes data using a model of pure aggregation. It has no
     mechanism for handling object references. Aliased references will
     result in multiple object instances being deserialized. WDDX 
     serialization applied to a data structure that has cyclical references
     will most likely result in infinite iteration/recursion,depending on
     the serializer implementation.

-->

<!ELEMENT wddxPacket (header,data)>
<!ATTLIST wddxPacket
          version CDATA #FIXED "0.9">

<!ELEMENT header (comment?)>

<!ELEMENT comment (#PCDATA)>

<!ELEMENT data (boolean | number | dateTime | string | array | struct | recordset)*>

<!ELEMENT boolean EMPTY>
<!ATTLIST boolean 
          value (true | false) #required>

<!ELEMENT string (#PCDATA)>

<!ELEMENT number (#PCDATA)>

<!ELEMENT dateTime (#PCDATA)>

<!ELEMENT array (boolean | number | dateTime | string | array | struct | recordset)*>
<!ATTLIST array 
          length CDATA #required>

<!ELEMENT struct (var*)>

<!ELEMENT var (boolean | number | dateTime | string | array | struct | recordset)>
<!ATTLIST var
          name CDATA #required>

<!ELEMENT recordset (field*)>       
<!ATTLIST recordset 
          rowCount CDATA #required
          fieldNames CDATA #required>

<!ELEMENT field (boolean | number | dateTime | string)*>
<!ATTLIST field
          name CDATA #required>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。