oscom-lenya-notimes/pubs/ina/content/util create.xsp,NONE,1.1
Michael Wechner <[email protected]> Wed, 28 May 2003 06:18:17 +0200
| Newsgroups | gmane.comp.cms.wyona.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /usr/local/repositories/oscom-lenya-notimes/pubs/ina/content/util
In directory erbium:/tmp/cvs-serv28772/pubs/ina/content/util
Added Files:
create.xsp
Log Message:
Article creator added
--- NEW FILE: create.xsp ---
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page
language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-request="http://apache.org/xsp/request/2.0"
xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
>
<parent-child>
<xsp:logic>
String status = <xsp-request:get-parameter name="status"/>;
// Get the parentId
String parentId = <xsp-request:get-parameter name="parent-uri"/>; // get it from the query-string
if (parentId == null) {
parentId = <input:get-attribute module="page-envelope" as="string" name="document-id"/>;
parentId = parentId.substring(0, parentId.length()-"/index".length());
}
// Get doctype
String doctype = <xsp-request:get-parameter name="doctype"/>; // get it from the query-string
if (doctype == null) {
doctype = "default";
}
if ((status != null) && (status.equals("failed"))) {
<xsp:content><exception/></xsp:content>
}
</xsp:logic>
<parentid><xsp:expr>parentId</xsp:expr></parentid>
<referer><xsp-request:get-uri/></referer>
<doctype><xsp:expr>doctype</xsp:expr></doctype>
<childtype>leaf</childtype>
</parent-child>
</xsp:page>