commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From haipeng du <>
Subject parsing error
Date Sat, 05 Feb 2005 00:30:44 GMT
When I use commons digester to parse my xml file, i got the exception:
org.xml.sax.SAXParseException: more pseudo attributes is expected.
my DTD file looks like:

<?xml version="1.0" ?>
<!DOCTYPE document-type [
		Root elemenet "document":
		      name: document type name
			  extends: parent documents file name, with order. If two document
type contain the same metadata, use the first one
			           if this file also contains the same meta field, use this file's
			  allow-custom-meta: if user can add their own meta field into document.
			  description: descripe the document.
			  type: what kind of document defined, such as pdf
			  user: only whom can use this document, if not specified, all user
can user that
			  meta-fields: system meta data fields that document has
	<!ELEMENT document-type ( description?, roles?, meta-fields? )>
	    <!ATTLIST document-type name CDATA #REQUIRED>
	    <!ATTLIST document-type extends CDATA #IMPLIED>
		<!ATTLIST document-type allow-custom-fields (true | false) "true" >
	    <!ELEMENT description (#PCDATA) >
	    <!ELEMENT roles (role*) >
		   <!ELEMENT role (description?)>
		   <!ATTLIST role name CDATA #IMPLIED >
		<!-- meta-fields: define what kind of system meta data fields that
document has
	    <!ELEMENT meta-fields ( meta-field* ) >
		<!-- meta-field: one meta field in the document.
			     name: filed name
				 required: if this field must be filled.
				 class: what is the class of field value. default is
"java.lang.String".(future feature)
				 default: default value of this field
	       <!ELEMENT meta-field ( description?, default-value,display-name )>
	          <!ATTLIST meta-field name CDATA #REQUIRED>
			  <!ATTLIST meta-field required (true | false) "true" >			  
	          <!ATTLIST meta-field class CDATA "java.lang.String" >
	          <!ELEMENT default-value (#PCDATA) >
			  <!ELEMENT display-name (#PCDATA) >

and xml file looks like:
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE document-type SYSTEM 'document-type.dtd"> 

<document-type name="pdfDoctype" extends="test1.xml,test2.xml"
	           allow-custom-fields="true" >
		this file define the metadata fields for pdf document type
		<role id="1" name="testrole1">
				Not known role
		<role id="2" name="testrole2">
				Test role 2
		<meta-field required="true" name="fileName">
			<description>Name of file</description>
			<display-name>File Name</display-name>
		<meta-field required="true" name="fileAuthor" >
			<description>Author of file</description>
			<display-name>File Author</display-name>
>From website, somebody said I can change doctype to:
<!DOCTYPE document-type PUBLIC "-//Sun Microsystems, Inc.//DTD Java
Data Objects Metadata 1.0//EN" "document-type.dtd">
But it still does not work.
Could somebody give me the solutions for this?
Thanks a lot.
Haipeng Du
Software Engineer
Salt Lake City

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message