You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2003/05/30 16:54:55 UTC
cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/publication DocumentTypeBuilder.java
andreas 2003/05/30 07:54:55
Modified: src/java/org/apache/lenya/cms/publication
DocumentTypeBuilder.java
Log:
added DOCTYPE_DIRECTORY field
Revision Changes Path
1.4 +10 -2 cocoon-lenya/src/java/org/apache/lenya/cms/publication/DocumentTypeBuilder.java
Index: DocumentTypeBuilder.java
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/publication/DocumentTypeBuilder.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DocumentTypeBuilder.java 28 May 2003 14:46:18 -0000 1.3
+++ DocumentTypeBuilder.java 30 May 2003 14:54:55 -0000 1.4
@@ -24,11 +24,18 @@
public DocumentTypeBuilder() {
}
+
/**
+ * The default document types configuration directory, relative to the publication directory.
+ */
+ public static final String DOCTYPE_DIRECTORY
+ = "config/doctypes".replace('/', File.separatorChar);
+ /*
* The default document types configuration file, relative to the publication directory.
*/
public static final String CONFIG_FILE
- = "config/doctypes/doctypes.xconf".replace('/', File.separatorChar);
+ = "doctypes.xconf".replace('/', File.separatorChar);
+
/**
* Builds a document type for a given name.
@@ -40,7 +47,8 @@
public DocumentType buildDocumentType(String name, Publication publication)
throws DocumentTypeBuildException {
- File configFile = new File(publication.getDirectory(), CONFIG_FILE);
+ File configDirectory = new File(publication.getDirectory(), DOCTYPE_DIRECTORY);
+ File configFile = new File(configDirectory, CONFIG_FILE);
try {
Document document = DocumentHelper.readDocument(configFile);
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org