Xopus revisited
Michael Wechner <[email protected]> Wed, 26 Mar 2003 01:21:09 +0100
| Newsgroups | gmane.comp.cms.wyona.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi I just did some Xopus implementation for NITF and was stumbling across some "features" which I have forgotten: Concerning Xopus: ----------------- The XSLT your loading has to look at least like the following: <?xml version="1.0"?> <xsl:stylesheet xmlns:xs="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="text()"> <xsl:copy /> </xsl:template> <xsl:template match="my-document-root-tag"> <div> Good Night Lenya <xsl:apply-templates /> </div> </xsl:template> </xsl:stylesheet> Some explanations for that: 1) the "text()" template is necessary because else you won't see any text 2) the div (or actually any tag) is necessary because else the output won't be single-rooted, which is not appreciated Concerning Lenya: ----------------- 1) The document your piping through the lenya/xslt/xopus/root.xsl needs to have as root-tag "lenya", else the templates won't grip and there will be no Javascript to be loaded and hence your screen will say: Document loading .... , but nothing happens. 2) A userid is needed, else you can't save the document after editing it (feature of the revision controller) Concerning XML Schema: ---------------------- Gregor showed me a nice trick to generate an XML Schema based on an example document by using TRANG: java -jar trang.jar example.xml example.xsd where java should be supporting the -jar option, such as for instance j2sdk1.4.1_02 HTH Michael