Hi Jonathan,
When I run your xml document through sax.SAXCount with validation
on with the latest cvs build I get:

java sax.SAXCount -v ldapfeedwriter.xml

[Error] ldapfeedwriter.xml:5:15: Element type "file-name2" must be declared.
[Error] ldapfeedwriter.xml:13:10: The content of element type "file" must match "(file-name,file-server,file-user?,file-password?,file-filter?,file-base,file-attributes?,file-formater)".
ldapfeedwriter.xml: 1162 ms (37 elems, 0 attrs, 113 spaces, 809 chars)


Is this what would you expect?

Thanks,
           Jeffrey Rodriguez
           IBM Silicon Valley
           XML Development



From: "Smith, Jonathan" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: DTD Error
Date: Tue, 1 Aug 2000 11:10:44 -0400


One thing that I would like to bring up. is that if I have a dtd file like this one


<!ELEMENT app (file+)>
<!ELEMENT file (file-name,
                file-server,
                                file-user?,
                                file-password?,
                                file-filter?,
                                file-base,
                                file-attributes?,
                                file-formater)>

<!ELEMENT file-name (#PCDATA)>
<!ELEMENT file-server (#PCDATA)>
<!ELEMENT file-user (#PCDATA)>
<!ELEMENT file-password (#PCDATA)>
<!ELEMENT file-filter (#PCDATA)>
<!ELEMENT file-base (#PCDATA)>
<!ELEMENT file-attributes (#PCDATA)>
<!ELEMENT file-formater (#PCDATA)>

and the following xml file

<?xml version="1.0"?>
<!DOCTYPE app SYSTEM "ldapfeedwriter.dtd">
<app>
        <file>
                <file-name2>DavidRichards.csv</file-name2>
                <file-server>pw411.pwj.com</file-server>
                <file-user>cn=directory manager</file-user>
                <file-password>333</file-password>
                <file-filter>objectclass=painewebberperson</file-filter>
                <file-base>o=painewebber,c=us</file-base>
                
<file-attributes>cn,uid,costcenter,departmentname</file-attributes>
                
<file-formater>com.painewebber.messagingcollaboration.ldap.LDAPCSVEntryWriter</file-formater>
        </file>
        <file>
                <file-name>tp01.txt</file-name>
                <file-server>pw411.pwj.com</file-server>
                <file-user>cn=directory manager</file-user>
                <file-password>222</file-password>
                <file-filter>objectclass=painewebberperson</file-filter>
                <file-base>o=painewebber,c=us</file-base>
                
<file-attributes>employeenumber,departmentname,socialsecurity,costcenter,employeetype</file-attributes>
                <file-formater>LDAPPLFeed</file-formater>
        </file>
        <file>
                <file-name>tp01.xml</file-name>
                <file-server>pw411.pwj.com</file-server>
                <file-user>cn=directory manager</file-user>
                <file-password>444</file-password>
                <file-filter>objectclass=painewebberperson</file-filter>
                <file-base>o=painewebber,c=us</file-base>
                
<file-attributes>employeenumber,departmentname,socialsecurity,costcenter,employeetype</file-attributes>
                
<file-formater>com.painewebber.messagingcollaboration.ldap.LDAPXMLEntryWriter</file-formater>
        </file>
        <file>
                <file-name>tp_dsml.xml</file-name>
                <file-server>pw411.pwj.com</file-server>
                <file-user>cn=directory manager</file-user>
                <file-password>555</file-password>
                <file-filter>objectclass=painewebberperson</file-filter>
                <file-base>o=painewebber,c=us</file-base>
                
<file-attributes>employeenumber,departmentname,socialsecurity,costcenter,employeetype</file-attributes>
                
<file-formater>com.painewebber.messagingcollaboration.ldap.LDAPDSMLEntryWriter</file-formater>
        </file>
</app>

I am not getting a error?? can you please tell me why?? I would think that sax sees that for the first file no filename was set?




Johnathan Mark Smith Messaging & Collaboration PaineWebber Incorporated 1000 Harbor Boulevard, 6th Floor Weehawken, NJ 07087-6791 Phone: 201.352.1387 Fax: 201.902.5273 E-mail: [EMAIL PROTECTED]


-----Original Message----- From: Arnaud Le Hors [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2000 10:17 PM To: [EMAIL PROTECTED] Cc: xalan-dev@xml.apache.org; xerces-j-dev@xml.apache.org Subject: Re: Problem building current XERCES / XALAN


The addition of the hasAttributes() method was decided by the W3C DOM WG last week on my request. I implemented it right away and didn't realize xalan depended on this interface and would break. Sorry about that. It is trivial to fix though. Note that the addition of this method was motivated by the fact that in some implementations, such as Xerces, smaller memory footprint can be achieved if instead of calling directly getAttributes(), you guard it with a test of hasAttributes(). The point is that on an element without any attributes you'll save the creation of a NamedNodeMap. I therefore recommend everybody to update their code along those lines. -- Arnaud Le Hors - IBM Cupertino, XML Technology Group

PS: xerces-dev is dead. You should use xerces-j-dev instead.

________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com



Reply via email to