jeremy      02/03/22 04:10:00

  Modified:    src/scratchpad/webapp/mount/editor README editor.xmap
                        test.xmap
               src/scratchpad/webapp/mount/editor/editor/docs
                        alpha-config.xml bravo-config.xml
                        schematron-page.xml welcome.xml
               src/scratchpad/webapp/mount/editor/editor/stylesheets
                        dir2editor.xsl editor-alpha-components.xsl
                        editor-bravo-components.xsl editor-components.xsl
                        editor-page2html.xsl editor-utils.xsl
                        editor2writer.xsl file2editor.xsl
                        request2editor.xsl stream2editor.xsl
               src/scratchpad/webapp/mount/editor/stylesheets
                        simple-page2html.xsl
  Log:
  updated layouts to use CSS instead of nested tables
  
  Revision  Changes    Path
  1.6       +44 -27    xml-cocoon2/src/scratchpad/webapp/mount/editor/README
  
  Index: README
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/README,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- README    14 Mar 2002 19:59:17 -0000      1.5
  +++ README    22 Mar 2002 12:09:59 -0000      1.6
  @@ -1,4 +1,4 @@
  -WriteableSourceTransformer - Installation Notes.
  +SourceWritingTransformer - Installation Notes.
   
   
   Once you have the latest copy of Cocoon 2 from CVS, compile it.
  @@ -43,32 +43,49 @@
   
   Here is a breakdown of the StyleSheets used by the editor, and what they do:
   
  -dir2editor.xsl
  -     converts a directory listing from the XPathDirectoryGenerator into an Editor
  -editor-alpha-components.xsl
  -     Handles Alpha form creation
  -editor-bravo-components.xsl
  -     Handles Bravo Form creation
  -editor-components.xsl
  -     contains generic editor components for things like:
  -     directory listing formatting, source:write reporting, editor-view etc.
  -editor-page2html.xsl
  -     controls the style of the page for all 'behaviours' calling different 
templates as appropriate.
  -     It xsl:include's 'editor-components.xsl', 'editor-utils.xsl', 
  -     'editor-alpha-components.xsl' and 'editor-bravo-components.xsl'.
  -     It reacts to the behaviour name embedded in the structure of the xml, by the 
aggregation and fetching process                   
  -editor-utils.xsl
  -     a few generic utilities used by editor-page2html.xsl
  -simple-page2html.xsl
  -     renders <slash-edit/> welcome page
  -file2editor.xsl
  -     copies the output of the FileGenerator
  -request2editor.xsl
  -     constructs a new document from the output of the RequestGenerator 
  -     into a tag telling the WriteableSourceTransformer to do it's job.
  -stream2editor.xsl
  -     copies the output of the StreamGenerator into a tag telling the
  -     WriteableSourceTransformer to do it's job.
  +Generation Stage
  +     generation-components.xsl
  +             contains generic generation components for things like:
  +             CR to para tag conversion, calculating browser path etc.
  +     dir2editor.xsl
  +             converts a directory listing from the XPathDirectoryGenerator into an 
Editor
  +     file2editor.xsl
  +             copies the output of the FileGenerator
  +     request2editor.xsl
  +             constructs a new document from the output of the RequestGenerator 
  +     stream2editor.xsl
  +             constructs a new document from the output of the  StreamGenerator
  +
  +Validation Stage
  +     validationFilter.xsl
  +             modifies the behaviour of the request to 'get', if a validation error 
has occurred, so that the user can re-edit the content
  +     editor2writer.xsl
  +             wraps the instance data in tags to get SourceWritingTransformer to do 
it's job, when the behaviour is 'put'
  +     schematron-validator2xsl.xsl
  +             main validation.xsl generator, set up specifically for slash-edit
  +     schematron-wrappers.xsl
  +             wrappers to handle slash-edit data
  +     schematron-extensions.xsl
  +             extension to calculate paths to fields (needs rewriting)
  +
  +Rendering Stage
  +
  +     editor-alpha-components.xsl
  +             Handles Alpha form creation
  +     editor-bravo-components.xsl
  +             Handles Bravo Form creation
  +     editor-components.xsl
  +             contains generic editor components for things like:
  +             directory listing formatting, source:write reporting, editor-view etc.
  +     editor-page2html.xsl
  +             controls the style of the page for all 'behaviours' calling different 
templates as appropriate.
  +             It xsl:include's 'editor-components.xsl', 'editor-utils.xsl', 
  +             'editor-alpha-components.xsl' and 'editor-bravo-components.xsl'.
  +             It reacts to the behaviour name embedded in the structure of the xml, 
by the generation process                 
  +     editor-utils.xsl
  +             a few generic utilities used by editor-page2html.xsl
  +     simple-page2html.xsl
  +             renders <slash-edit/> welcome page
   
   
   The file 'mount/editor/editor/docs/[sub-editor]-config.xml' contains information 
used by 'editor-page2html.xsl' such as the names of buttons, the tools for each 
behaviour, the available commands etc. for each sub-editor.
  
  
  
  1.7       +70 -39    xml-cocoon2/src/scratchpad/webapp/mount/editor/editor.xmap
  
  Index: editor.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor.xmap,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- editor.xmap       17 Mar 2002 21:26:55 -0000      1.6
  +++ editor.xmap       22 Mar 2002 12:09:59 -0000      1.7
  @@ -54,12 +54,10 @@
                <map:pipeline internal-only="false">
   
                        <!-- 
  -                     
                                Validating XSLT generator
                        
                                Generates a Schematron Validating XSLT
                                from your schematron-[doctype].xml file
  -                             
                        -->
                
                        <map:match pattern="make-validator(*)">
  @@ -68,24 +66,21 @@
                                <map:serialize type="xml"/>
                        </map:match>
   
  +             </map:pipeline>
  +
  +             <map:pipeline internal-only="true">
                        <!-- 
                        
  -                             Internal pipelines to collect and format the 
appropriate content based on the requested behaviour and sub-editor
  -                             
  -                             eg. the 'put' behaviour is different for 'alpha' and 
'bravo' sub-editors
  -                             All other behaviours currently ignore the sub-editor 
because I don't need them to do anything different at the moment 
  +                             Generation pipelines to collect and format the 
appropriate content based on the requested behaviour and sub-editor
                                
                                -->
   
  -
                        <!-- 
  -                             
                                Directory Listing
                                
                                Uses the XPathDirectoryGenerator to extract the 
'title' of each document
                                This one removes any filename from the path, (which is 
a PIA to do in XSL!)
                                Enforces using 'docs' folder of the main project as 
the root. 
  -                     
                        -->
                        <map:match pattern="content-dir(*,**/*)">
                                <map:generate type="xpathdirectory" 
src="docs{2}/#/page/title"/>                                                
  @@ -98,12 +93,9 @@
                        </map:match>
   
                        <!-- 
  -                     
                                New
                                
  -                             Both my sub-editors edit the same doctype, so I can do 
everything from one template
  -                             To have different templates, you need new sub-editors, 
and possibly, more specific pipelines to handle them
  -                             
  +                             Start a new document from a template
                        -->
                        <map:match pattern="content-new(*,**)">
                                <map:generate src="editor/docs/template.xml"/>  <!-- 
get a template -->
  @@ -114,31 +106,13 @@
                                </map:transform>
                                <map:serialize type="xml"/>                            
                                 
                        </map:match>
  -
  -                     <map:match pattern="request-*(bravo)">
  -                             <map:generate type="request"/>
  -                             <map:transform 
src="editor/stylesheets/request2editor.xsl">
  -                                     <map:parameter name="sub" value="bravo"/>
  -                                     <map:parameter name="behaviour" value="{1}"/>
  -                             </map:transform>
  -                             <map:serialize type="xml"/>                            
                                 
  -                     </map:match>
  -
  -                     <map:match pattern="request-*(alpha)">
  -                             <map:act type="request">
  -                                     <map:parameter name="parameters" value="true"/>
  -                                     <map:generate type="stream">
  -                                             <map:parameter name="form-name" 
value="{xml-field-name}"/>
  -                                     </map:generate>
  -                                     <map:transform 
src="editor/stylesheets/stream2editor.xsl">
  -                                             <map:parameter name="sub" 
value="alpha"/>
  -                                             <map:parameter name="target" 
value="{target}"/>
  -                                             <map:parameter name="behaviour" 
value="{../1}"/>
  -                                     </map:transform>
  -                                     <map:serialize type="xml"/>
  -                             </map:act>                                             
 
  -                     </map:match>
  -
  +             
  +                     <!-- 
  +                             Put
  +                             
  +                             Create a Document out of a Request
  +                             save it if ther are no validation errors
  +                     -->
                        <map:match pattern="content-put(*,**)">
                                <map:generate src="cocoon:/request-put({1})"/>
                                <map:transform src="cocoon:/make-validator(page)"/>
  @@ -150,6 +124,12 @@
                                <map:serialize type="xml"/>
                        </map:match>
   
  +                     <!-- 
  +                             Pre
  +                             
  +                             Create a Preview Document out of a Request
  +                             validate it
  +                     -->
                        <map:match pattern="content-pre(*,**)">
                                <map:generate src="cocoon:/request-pre({1})"/>
                                <map:transform src="cocoon:/make-validator(page)"/>
  @@ -158,9 +138,10 @@
                        </map:match>
   
                        <!-- 
  -                     
                                Get or See
                                
  +                             Makes a Document from Source
  +                             
                                Enforces using 'docs' folder of the main project as 
the root. 
   
                                NB. Do not put a slash at the end of the root 
directory for the generator, 
  @@ -176,6 +157,52 @@
                                </map:transform>
                                <map:serialize type="xml"/>                            
                                 
                        </map:match>
  +             
  +             
  +             
  +             </map:pipeline>
  +
  +             <map:pipeline internal-only="true">
  +                     <!-- 
  +                     
  +                             Generation pipelines to create a new Document from 
Request Data
  +                             
  +                             -->
  +
  +                     <!-- 
  +                     
  +                             Alpha Editor, using the StreamGenerator
  +                             
  +                             -->
  +                     <map:match pattern="request-*(alpha)">
  +                             <map:act type="request">
  +                                     <map:parameter name="parameters" value="true"/>
  +                                     <map:generate type="stream">
  +                                             <map:parameter name="form-name" 
value="xml-field"/>
  +                                     </map:generate>
  +                                     <map:transform 
src="editor/stylesheets/stream2editor.xsl">
  +                                             <map:parameter name="sub" 
value="alpha"/>
  +                                             <map:parameter name="target" 
value="{target}"/>
  +                                             <map:parameter name="behaviour" 
value="{../1}"/>
  +                                     </map:transform>
  +                                     <map:serialize type="xml"/>
  +                             </map:act>
  +                     </map:match>
  +
  +                     <!-- 
  +                     
  +                             Bravo Editor, using the RequestGenerator
  +                             
  +                             -->
  +                     <map:match pattern="request-*(bravo)">
  +                             <map:generate type="request"/>
  +                             <map:transform 
src="editor/stylesheets/request2editor.xsl">
  +                                     <map:parameter name="sub" value="bravo"/>
  +                                     <map:parameter name="behaviour" value="{1}"/>
  +                             </map:transform>
  +                             <map:serialize type="xml"/>                            
                                 
  +                     </map:match>
  +
                </map:pipeline> 
                
                <map:pipeline>  
  @@ -226,7 +253,11 @@
                        <map:handle-errors>
                                <map:transform 
src="context://stylesheets/system/error2html.xsl"/>
                                <map:serialize status-code="500"/>
  +                             <!--<map:serialize type="xml"/>-->
                        </map:handle-errors>
  +                     <!--<map:handle-errors>
  +                             <map:serialize status-code="500" type="xml"/>
  +                     </map:handle-errors>-->
                        <map:handle-errors type="404">
                                <map:transform 
src="context://stylesheets/system/error2html.xsl"/>
                                <map:serialize/>
  
  
  
  1.3       +1 -1      xml-cocoon2/src/scratchpad/webapp/mount/editor/test.xmap
  
  Index: test.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/test.xmap,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- test.xmap 28 Feb 2002 19:05:11 -0000      1.2
  +++ test.xmap 22 Mar 2002 12:09:59 -0000      1.3
  @@ -28,7 +28,7 @@
        <!-- if you leave it out altogether, 'xml' is used -->
       
        <map:transformer name="filewriter" logger="sitemap.transformer.tofile"
  -                             
src="org.apache.cocoon.transformation.WriteableSourceTransformer">
  +                             
src="org.apache.cocoon.transformation.SourceWritingTransformer">
                                <serializer>my-xml-serializer</serializer>
                        </map:transformer>
                        
  
  
  
  1.5       +8 -4      
xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/docs/alpha-config.xml
  
  Index: alpha-config.xml
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/docs/alpha-config.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- alpha-config.xml  18 Mar 2002 18:27:51 -0000      1.4
  +++ alpha-config.xml  22 Mar 2002 12:10:00 -0000      1.5
  @@ -12,6 +12,7 @@
        <title behaviour="see">View a Page</title>
        <title behaviour="dir">Directory Listing</title>
        <title behaviour="pre">Page Preview</title>
  +     <title behaviour="error">Error</title>
        
        <notify behaviour="new">Making a new File at</notify>
        <notify behaviour="get">Editing the File at</notify>
  @@ -19,6 +20,7 @@
        <notify behaviour="see">Viewing the File at</notify>
        <notify behaviour="dir">Directory Listing of</notify>
        <notify behaviour="pre">Editor Preview of</notify>
  +     <notify behaviour="error">An Error has occurred</notify>
   
        <notes behaviour="new">Please edit the XML, then click the 'Make New File' 
button above</notes>
        <notes behaviour="get">Please edit the XML, then click the 'Save My Changes' 
button above</notes>
  @@ -70,11 +72,13 @@
                <tool command="new"/>
                <tool command="see"/>
        </tools>
  +     <tools behaviour="error">
  +             <tool command="dir"/>
  +             <tool command="new"/>
  +     </tools>
   
   <!-- what to call the parent directory link -->
  -     <parent-dir tip="View Parent Directory listing">..</parent-dir>
  -<!-- what to call the field the XML goes in -->
  -     <xml-field-name>xml-field</xml-field-name>
  +     <parent-dir tip="View Parent Directory listing">Parent ..</parent-dir>
   <!-- what to call new files -->
  -     <default-new-file>new.xml</default-new-file>
  +     <default-new-file>/new.xml</default-new-file>
   </config>
  
  
  
  1.6       +8 -2      
xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/docs/bravo-config.xml
  
  Index: bravo-config.xml
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/docs/bravo-config.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- bravo-config.xml  18 Mar 2002 18:27:51 -0000      1.5
  +++ bravo-config.xml  22 Mar 2002 12:10:00 -0000      1.6
  @@ -12,6 +12,7 @@
        <title behaviour="see">View a Document</title>
        <title behaviour="dir">Directory Listing</title>
        <title behaviour="pre">Document Preview</title>
  +     <title behaviour="error">Error</title>
        
        <notify behaviour="new">Making a new Document at</notify>
        <notify behaviour="get">Editing the Document at</notify>
  @@ -19,6 +20,7 @@
        <notify behaviour="see">Viewing the Document at</notify>
        <notify behaviour="dir">Directory Listing of</notify>
        <notify behaviour="pre">Editor Preview of</notify>
  +     <notify behaviour="error">An Error has occurred</notify>
   
        <notes behaviour="new">Please edit the fields, then click the 'Make New 
Document' button above</notes>
        <notes behaviour="get">Please edit the fields, then click the 'Save My 
Changes' button above</notes>
  @@ -70,9 +72,13 @@
                <tool command="new"/>
                <tool command="see"/>
        </tools>
  +     <tools behaviour="error">
  +             <tool command="dir"/>
  +             <tool command="new"/>
  +     </tools>
   
   <!-- what to call the parent directory link -->
  -     <parent-dir tip="View Parent Directory listing">..</parent-dir>
  +     <parent-dir tip="View Parent Directory listing">Parent ..</parent-dir>
   <!-- what to call new files -->
  -     <default-new-file>new.xml</default-new-file>
  +     <default-new-file>/new.xml</default-new-file>
   </config>
  
  
  
  1.3       +7 -4      
xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/docs/schematron-page.xml
  
  Index: schematron-page.xml
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/docs/schematron-page.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- schematron-page.xml       17 Mar 2002 21:26:55 -0000      1.2
  +++ schematron-page.xml       22 Mar 2002 12:10:00 -0000      1.3
  @@ -8,19 +8,22 @@
        
   <schema ns="http://xml.apache.cocoon/page"; 
xmlns="http://www.ascc.net/xml/schematron";>
        <title>Schema for &lt;slash-edit/&gt;</title>
  -     <pattern name="Cocoon Simple Page">
  +     
  +     <pattern name="Simple Page (Structure)">
                <rule context="page">
                        <assert  test="count(title) &gt; 0">There should be a title 
tag.</assert>
                        <assert  test="count(title) &lt; 2">There only should be one 
title tag.</assert>
                        <assert  test="count(content) &gt; 0">There should be one 
content tag.</assert>
                        <assert  test="count(content) &lt; 2">There only should be one 
content tag.</assert>
                </rule>
  -             <rule context="title">
  +     </pattern>
  +     <pattern name="Simple Page (Content)">
  +             <rule context="title[1]">
                        <assert  test="string-length(.) &gt; 3">The title should be at 
least 4 characters.</assert>
  -                     <assert  test="string-length(.) &lt; 40">The title should be 
less than 30 characters.</assert>
  +                     <assert  test="string-length(.) &lt; 40">The title should be 
less than 40 characters.</assert>
                        <assert  test="text() != ' - please write your title here - 
'">Your title is a bit boring! ;-)</assert>
                </rule>
  -             <rule context="content">
  +             <rule context="content[1]">
                        <assert test="para">There should be at least one para 
tag.</assert>
                        <assert test="para[1]/text() != ' - you can put in any number 
of paragraphs - '">Oh do try and make your content a little more interesting! 
;-).</assert>
                </rule>
  
  
  
  1.6       +4 -1      
xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/docs/welcome.xml
  
  Index: welcome.xml
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/docs/welcome.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- welcome.xml       17 Mar 2002 16:10:25 -0000      1.5
  +++ welcome.xml       22 Mar 2002 12:10:00 -0000      1.6
  @@ -92,7 +92,7 @@
                                <td colspan="3">Components Used:</td>
                        </tr>
                        <tr valign="top">
  -                             
<td>&#160;&#160;</td><td>WriteableSourceTransformer</td><td>Sends part of the SAX 
stream to a WriteableSource</td>
  +                             
<td>&#160;&#160;</td><td>SourceWritingTransformer</td><td>Sends part of the SAX stream 
to a WriteableSource</td>
                        </tr>
                        <tr valign="top">
                                <td></td><td>DirectoryGenerator</td><td>Generates a 
directory listing</td>
  @@ -126,6 +126,9 @@
                        </tr>
                        <tr valign="top">
                                
<td></td><td>put</td><td>your-project/edit/<b>put(sub-editor)</b></td><td>receives a 
Form, writing the contents back to File</td>
  +                     </tr>
  +                     <tr valign="top">
  +                             
<td></td><td>pre</td><td>your-project/edit/<b>pre(sub-editor)</b></td><td>receives a 
Form, validates the instance, returns a form and a view of the data for you to confirm 
the modification</td>
                        </tr>
                </table>
    </content>
  
  
  
  1.5       +0 -1      
xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/dir2editor.xsl
  
  Index: dir2editor.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/dir2editor.xsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- dir2editor.xsl    17 Mar 2002 21:26:55 -0000      1.4
  +++ dir2editor.xsl    22 Mar 2002 12:10:00 -0000      1.5
  @@ -6,7 +6,6 @@
    >
   
        <xsl:include href="generation-utils.xsl"/>                                     
                         <!-- utility templates and variables -->
  -
        <xsl:param name="target"/>
         
        <xsl:template match="/">
  
  
  
  1.6       +42 -55    
xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor-alpha-components.xsl
  
  Index: editor-alpha-components.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor-alpha-components.xsl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- editor-alpha-components.xsl       18 Mar 2002 18:27:51 -0000      1.5
  +++ editor-alpha-components.xsl       22 Mar 2002 12:10:00 -0000      1.6
  @@ -4,68 +4,55 @@
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
   >
   
  +
   <!-- your form for editing 'page' doctype content, handles the 'alpha' sub-editor 
for 'get' and 'new' behaviours -->
   
        <xsl:template match="editor[@sub='alpha']/instance[@behaviour='get' or 
@behaviour='new']/page" mode="sub-editor">
  -             <br/>
  -             <table bgcolor="#0086B2" border="0" cellspacing="1" cellpadding="5">
  -                     <tr>
  -                             <td class="block-title" colspan="2">Alpha Editor</td>
  -                     </tr>
  -                     <tr>
  -                             <td bgcolor="white">
  -                                     <form method="post">
  -                                             <xsl:attribute 
name="action"><xsl:value-of select="$command-base"/><xsl:value-of 
select="$config/command[@behaviour = 'pre']"/></xsl:attribute>
  -                                             <table border="0" cellspacing="0" 
cellpadding="5" width="100%">
  -                                                     <tr>
  -                                                             <td colspan="2"><span 
class="block-title">File content: </span><br/><textarea 
name="{$config/xml-field-name}" rows="20" cols="80" xml:space="preserve" 
onchange="changed=true;"><xsl:apply-templates select="."/> </textarea></td>
  -                                                     </tr>
  -                                                     <tr>
  -                                                             <td valign="middle">
  -                                                                     <span 
class="block-title">Save as: </span><br/><input type="text" name="target" 
value="{$newfile}" size="40" title="Note: to make a new directory, prepend the 
filename with a directory path"/>
  -                                                             </td>
  -                                                             <td align="right">
  -                                                                     <input 
type="hidden" name="xml-field-name" value="{$config/xml-field-name}"/>
  -                                                                     <input 
class="submit" type="submit" value="{$config/button[@behaviour = $behaviour]}"/>
  -                                                             </td>
  -                                                     </tr>
  -                                             </table>                               
                 
  -                                     </form>
  -                             </td>
  -                     </tr>
  -             </table>
  -             <br/>
  +             <div class="block">
  +                     <span class="tab">Alpha Editor</span>
  +                     <div class="content">
  +                             <form method="post">
  +                                     <xsl:attribute name="action"><xsl:value-of 
select="$command-base"/><xsl:value-of select="$config/command[@behaviour = 
'pre']"/></xsl:attribute>
  +                                     <div class="block">
  +                                             <span class="tab">File content</span>
  +                                             <div class="field">
  +                                                     <textarea name="xml-field" 
rows="20" cols="80" xml:space="preserve" onchange="changed=true;"><xsl:apply-templates 
select="."/> </textarea>
  +                                             </div>
  +                                     </div>
  +                                     <div class="block">
  +                                             <span class="tab">Save as: </span>
  +                                             <div class="field">
  +                                                     <input type="text" 
name="target" value="{$newfile}" size="40" title="Note: to make a new directory, 
prepend the filename with a directory path"/>
  +                                             </div>
  +                                     </div>
  +                                     <div class="block" style="text-align:right">
  +                                             <input class="submit" type="submit" 
value="{$config/button[@behaviour = $behaviour]}"/>
  +                                     </div>
  +                             </form>
  +                     </div>
  +             </div>
     </xsl:template>
   
   <!-- your template for previewing 'page' doctype content, handles the 'alpha' 
sub-editor for 'pre' behaviour -->
        <xsl:template match="editor[@sub='alpha']/instance[@behaviour='pre']/page" 
mode="sub-editor">
  -             <br/>
  -             <table bgcolor="#0086B2" border="0" cellspacing="1" cellpadding="5" 
width="95%">
  -                     <tr>
  -                             <td class="notes" colspan="2">Editor Preview</td>
  -                     </tr>
  -              <tr><td bgcolor="white"><xsl:apply-templates 
mode="editor-view"/></td></tr>
  -             </table>
  -             <br/>
  -             <table bgcolor="#0086B2" border="0" cellspacing="1" cellpadding="5">
  -                     <tr>
  -                             <td class="notes" colspan="2">Confirm</td>
  -                     </tr>
  -                     <tr>
  -                             <td bgcolor="white" align="right">Are you sure you 
want to save these changes? 
  -                                     <form method="post">
  -                                             <xsl:attribute 
name="action"><xsl:value-of select="$command-base"/><xsl:value-of 
select="$config/command[@behaviour = 'put']"/></xsl:attribute>
  -                                             <input type="button" 
value="{$config/button[@behaviour = 'back']}" onClick="history.back()" 
title="{$config/button[@behaviour = 'back']/@tip}" class="button"/> 
  -                                             <textarea class="hidden" 
name="{$config/xml-field-name}" xml:space="preserve" 
onchange="changed=true;"><xsl:apply-templates select="."/> </textarea>
  -                                             <input name="target" type="hidden" 
value="{$newfile}"/>
  -                                             <input type="hidden" 
name="xml-field-name" value="{$config/xml-field-name}"/>
  -                                             <input 
name="{$config/button[@behaviour = $behaviour]}" class="submit" type="submit" 
title="{$config/button[@behaviour = $behaviour]/@tip}" 
value="{$config/button[@behaviour = $behaviour]}"/>
  -                                     </form> 
  -                             </td>
  -                     </tr>
  -             </table>
  -             <br/>
  -             
  +             <div class="block">
  +                     <span class="tab">Editor Preview</span>
  +                     <div class="content"><xsl:apply-templates 
mode="editor-view"/></div>
  +             </div>
  +             <div class="confirm">
  +                     <span class="tab">Confirm</span>
  +                     <div class="content" id="center">
  +                             <xsl:text>Are you sure you want to save these 
changes?</xsl:text>
  +                             <form method="post">
  +                                     <xsl:attribute name="action"><xsl:value-of 
select="$command-base"/><xsl:value-of select="$config/command[@behaviour = 
'put']"/></xsl:attribute>
  +                                     <textarea class="hidden" name="xml-field" 
xml:space="preserve" onchange="changed=true;"><xsl:apply-templates select="."/> 
</textarea>
  +                                     <input name="target" type="hidden" 
value="{$newfile}"/>
  +                                     <input type="button" 
value="{$config/button[@behaviour = 'back']}" onClick="history.back()" 
title="{$config/button[@behaviour = 'back']/@tip}" class="button"/> 
  +                                     <span class="hspace"> </span>
  +                                     <input name="{$config/button[@behaviour = 
$behaviour]}" class="submit" type="submit" title="{$config/button[@behaviour = 
$behaviour]/@tip}" value="{$config/button[@behaviour = $behaviour]}"/>
  +                             </form> 
  +                     </div>
  +             </div>
     </xsl:template>
   
   </xsl:stylesheet>
  
  
  
  1.7       +48 -56    
xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor-bravo-components.xsl
  
  Index: editor-bravo-components.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor-bravo-components.xsl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- editor-bravo-components.xsl       18 Mar 2002 20:42:58 -0000      1.6
  +++ editor-bravo-components.xsl       22 Mar 2002 12:10:00 -0000      1.7
  @@ -7,66 +7,58 @@
   
   <!-- your form for editing 'page' doctype content, handles the 'bravo' sub-editor 
for 'get' and 'new' behaviours -->
        <xsl:template match="editor[@sub='bravo']/instance[@behaviour='get' or 
@behaviour='new']/page" mode="sub-editor">
  -             <br/>
  -             <table bgcolor="#0086B2" border="0" cellspacing="1" cellpadding="5">
  -                     <tr>
  -                             <td class="notes" colspan="2">Bravo Editor</td>
  -                     </tr>
  -                     <tr>
  -                             <td bgcolor="white">
  -                                     <form method="post">
  -                                             <xsl:attribute 
name="action"><xsl:value-of select="$command-base"/><xsl:value-of 
select="$config/command[@behaviour = 'pre']"/></xsl:attribute>
  -                                             <table border="0" cellspacing="0" 
cellpadding="5" width="100%">
  -                                                     <tr>
  -                                                             <td><span 
class="block-title">Title: </span><br/><input name="title" size="40"  
onchange="changed=true;" value="{normalize-space(title)}"/></td>
  -                                                     </tr>
  -                                                     <tr>
  -                                                             <td colspan="2"><span 
class="block-title">Body: </span><br/><textarea name="content" rows="20" cols="80" 
xml:space="preserve" onchange="changed=true;"><xsl:apply-templates select="content/*" 
mode="bravo"/> </textarea></td>
  -                                                     </tr>
  -                                                     <tr>
  -                                                             <td valign="middle">
  -                                                                     <span 
class="block-title">Save as: </span><br/><input type="text" name="target" 
value="{$newfile}" size="40" title="Note: to make a new directory, prepend the 
filename with a directory path"/>
  -                                                             </td>
  -                                                             <td align="right">
  -                                                                     <input 
class="submit" type="submit" value="{$config/button[@behaviour = $behaviour]}"/>
  -                                                             </td>
  -                                                     </tr>
  -                                             </table>                               
                 
  -                                     </form> 
  -                             </td>
  -                     </tr>
  -             </table>
  -             <br/>
  +             <div class="block">
  +                     <span class="tab">Bravo Editor</span>
  +                     <div class="content">
  +                             <form method="post">
  +                                     <xsl:attribute name="action"><xsl:value-of 
select="$command-base"/><xsl:value-of select="$config/command[@behaviour = 
'pre']"/></xsl:attribute>
  +                                     <div class="block">
  +                                             <span class="tab">Title</span>
  +                                             <div class="field">
  +                                                     <input name="title" size="40"  
onchange="changed=true;" value="{normalize-space(title)}"/>
  +                                             </div>
  +                                     </div>
  +                                     <div class="block">
  +                                             <span class="tab">Body</span>
  +                                             <div class="field">
  +                                                     <textarea name="content" 
rows="20" cols="80" xml:space="preserve" onchange="changed=true;"><xsl:apply-templates 
select="content/*" mode="bravo"/> </textarea>
  +                                             </div>
  +                                     </div>
  +                                     <div class="block">
  +                                             <span class="tab">Save as</span>
  +                                             <div class="field">
  +                                                     <input type="text" 
name="target" value="{$newfile}" size="40" title="Note: to make a new directory, 
prepend the filename with a directory path"/>
  +                                             </div>
  +                                             <div class="block" 
style="text-align:right">
  +                                                     <input class="submit" 
type="submit" value="{$config/button[@behaviour = $behaviour]}"/>
  +                                             </div>
  +                                     </div>                                         
 
  +                             </form> 
  +                     </div>
  +             </div>
     </xsl:template>
   
   <!-- your template for previewing 'page' doctype content, handles the 'bravo' 
sub-editor for 'pre' behaviour -->
        <xsl:template match="editor[@sub='bravo']/instance[@behaviour='pre']/page" 
mode="sub-editor">
  -             <br/>
  -             <table bgcolor="#0086B2" border="0" cellspacing="1" cellpadding="5" 
width="95%">
  -                     <tr>
  -                             <td class="notes" colspan="2">Editor Preview</td>
  -                     </tr>
  -              <tr><td bgcolor="white"><xsl:apply-templates 
mode="editor-view"/></td></tr>
  -             </table>
  -             <br/>
  -             <table bgcolor="#0086B2" border="0" cellspacing="1" cellpadding="5">
  -                     <tr>
  -                             <td class="notes" colspan="2">Confirm</td>
  -                     </tr>
  -                     <tr>
  -                             <td bgcolor="white" align="right">Are you sure you 
want to save these changes? 
  -                                     <form method="post">
  -                                             <xsl:attribute 
name="action"><xsl:value-of select="$command-base"/><xsl:value-of 
select="$config/command[@behaviour = 'put']"/></xsl:attribute>
  -                                             <input type="button" 
value="{$config/button[@behaviour = 'back']}" onClick="history.back()" 
title="{$config/button[@behaviour = 'back']/@tip}" class="button"/> 
  -                                             <input name="title" type="hidden" 
value="{normalize-space(title)}"/>
  -                                             <textarea class="hidden" 
name="content" xml:space="preserve" onchange="changed=true;"><xsl:apply-templates 
select="content/*" mode="bravo"/> </textarea>
  -                                             <input name="target" type="hidden" 
value="{$newfile}"/>
  -                                             <input 
name="{$config/button[@behaviour = $behaviour]}" class="submit" type="submit" 
value="{$config/button[@behaviour = $behaviour]}"/>
  -                                     </form> 
  -                             </td>
  -                     </tr>
  -             </table>
  -             <br/>
  +             <div class="block">
  +                     <span class="tab">Editor Preview</span>
  +                     <div class="content"><xsl:apply-templates 
mode="editor-view"/></div>
  +             </div>
  +             <div class="confirm">
  +                     <span class="tab">Confirm</span>
  +                     <div class="content" id="center">
  +                             <xsl:text>Are you sure you want to save these 
changes?</xsl:text>
  +                             <form method="post">
  +                                     <xsl:attribute name="action"><xsl:value-of 
select="$command-base"/><xsl:value-of select="$config/command[@behaviour = 
'put']"/></xsl:attribute>
  +                                     <input name="title" type="hidden" 
value="{normalize-space(title)}"/>
  +                                     <textarea class="hidden" name="content" 
xml:space="preserve" onchange="changed=true;"><xsl:apply-templates select="content/*" 
mode="bravo"/> </textarea>
  +                                     <input name="target" type="hidden" 
value="{$newfile}"/>
  +                                     <input type="button" 
value="{$config/button[@behaviour = 'back']}" onClick="history.back()" 
title="{$config/button[@behaviour = 'back']/@tip}" class="button"/> 
  +                                     <span class="hspace"> </span>
  +                                     <input name="{$config/button[@behaviour = 
$behaviour]}" class="submit" type="submit" value="{$config/button[@behaviour = 
$behaviour]}"/>
  +                             </form> 
  +                     </div>
  +             </div>
     </xsl:template>
   
        <xsl:template match="b|i|a|strong|em|ul|ol|li" 
mode="bravo"><xsl:copy><xsl:apply-templates 
select="@*|*|text()"/></xsl:copy></xsl:template>
  
  
  
  1.7       +87 -138   
xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor-components.xsl
  
  Index: editor-components.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor-components.xsl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- editor-components.xsl     17 Mar 2002 21:26:55 -0000      1.6
  +++ editor-components.xsl     22 Mar 2002 12:10:00 -0000      1.7
  @@ -13,31 +13,21 @@
     </xsl:template>
   
        <xsl:template match="instance[@behaviour='see']/page" mode="sub-editor">
  -             <br/>
  -             <table bgcolor="#0086B2" border="0" cellspacing="1" cellpadding="5" 
width="95%">
  -                     <tr>
  -                             <td class="notes" colspan="2">Editor View</td>
  -                     </tr>
  -                     <tr>
  -                             <td bgcolor="white">
  -                             <table border="0" cellspacing="2" cellpadding="0" 
width="95%" bgcolor="white">
  -                              <tr><td><xsl:apply-templates 
mode="editor-view"/></td></tr>
  -                             </table>
  -                             </td>
  -                     </tr>
  -             </table>
  -             <br/>
  +             <div class="block">
  +                     <span class="tab">Editor View</span>
  +                     <div class="content"><xsl:apply-templates 
mode="editor-view"/></div>
  +             </div>
     </xsl:template>
   
   
   <!-- editor-view templates to display your doctype -->
   
        <xsl:template match="content" mode="editor-view">
  -             <div class="content"><xsl:apply-templates mode="editor-view"/></div>
  +             <div><xsl:apply-templates mode="editor-view"/></div>
     </xsl:template>
     
        <xsl:template match="title" mode="editor-view">
  -             <h2><xsl:apply-templates/></h2>
  +             <div class="title"><xsl:apply-templates/></div>
     </xsl:template>
     
        <xsl:template match="para" mode="editor-view">
  @@ -47,163 +37,122 @@
   
   <!-- Displays the directory listing -->
     <xsl:template match="dir:directory">
  -   <br/>
  -   <table border="0" cellspacing="2" cellpadding="0" width="95%" bgcolor="white">
  -              <tr>
  -                     <td width="20">
  -                      <a href="../" title="{$config/parent-dir/@tip}">
  -        <img src="{concat('image/',$config/command[@behaviour = 'dir']/@icon)}" 
border="0"/>
  -       </a>
  -      </td>
  -                     <td colspan="2">
  -                      <a href="../" 
title="{$config/parent-dir/@tip}"><b><xsl:value-of 
select="$config/parent-dir/text()"/></b></a>
  -                     </td>
  -                     <td></td>
  -                     <td><xsl:value-of select="@date"/></td>
  -              </tr>
  -              <xsl:apply-templates/>
  -   </table>
  -   <br/>
  +   <div class="block">
  +             <span class="tab"><a href="../" 
title="{$config/parent-dir/@tip}"><b><xsl:value-of 
select="$config/parent-dir/text()"/></b></a></span>
  +             <div class="content">
  +                     <table width="100%">
  +                             <xsl:apply-templates/>
  +                     </table>
  +             </div>
  +   </div>
     </xsl:template>
   
   <!-- Displays sub-directories -->
     <xsl:template match="dir:directory/dir:directory">
      <tr>
  -     <xsl:if test="position() mod 2 = 0"><xsl:attribute 
name="class">row</xsl:attribute></xsl:if>
  -    <td></td>
  -    <td width="20" align="right">
  -     <a href="{@name}/" title="{$config/command[@behaviour = 'dir']/@tip}">
  -      <img src="{concat('image/',$config/command[@behaviour = 'dir']/@icon)}" 
border="0"/>
  -     </a>
  -    </td>
  -    <td>
  -     <a href="{@name}/" title="{$config/command[@behaviour = 
'dir']/@tip}"><xsl:value-of select="@name"/></a>
  -    </td>
  -    <td></td>
  -    <td>
  -     <xsl:value-of select="@date"/>
  -    </td>
  -   </tr>
  +     <xsl:if test="position() mod 2 = 0"><xsl:attribute 
name="id">row</xsl:attribute></xsl:if>
  +     <td>
  +             <a href="{@name}/" title="{$config/command[@behaviour = 'dir']/@tip}">
  +             <img src="{concat('image/',$config/command[@behaviour = 
'dir']/@icon)}" border="0"/>
  +     </a>
  +     <a href="{@name}/" title="{$config/command[@behaviour = 
'dir']/@tip}"><xsl:value-of select="@name"/></a>
  +    </td>
  +    <td>Directory</td>
  +    <td><xsl:value-of select="@date"/></td>
  +      </tr>
     </xsl:template>
   
   <!-- Displays files in the directory listing -->
     <xsl:template match="dir:file">
      <tr>
  -     <xsl:if test="position() mod 2 = 0"><xsl:attribute 
name="class">row</xsl:attribute></xsl:if>
  -    <td></td>
  -    <td width="20" align="right">
  +     <xsl:if test="position() mod 2 = 0"><xsl:attribute 
name="id">row</xsl:attribute></xsl:if>
  +    <td>
        <a title="{$config/command[@behaviour = 'see']/@tip}">
         <xsl:attribute name="href"><xsl:value-of 
select="$command-base"/><xsl:value-of select="$config/command[@behaviour = 
'see']/text()"/><xsl:value-of select="$target"/><xsl:value-of 
select="@name"/></xsl:attribute>
         <img src="{concat('image/',$config/command[@behaviour = 'see']/@icon)}" 
border="0"/>
        </a>
  -    </td>
  -    <td width="40%">
        <a title="{$config/command[@behaviour = 'see']/@tip}">
         <xsl:attribute name="href"><xsl:value-of 
select="$command-base"/><xsl:value-of select="$config/command[@behaviour = 
'see']/text()"/><xsl:value-of select="$target"/><xsl:value-of 
select="@name"/></xsl:attribute>
         <xsl:value-of select="@name"/>
        </a>
       </td>
  -    <td>
  -     <xsl:value-of select="dir:xpath/title"/>
  -    </td>
  -    <td>
  -     <xsl:value-of select="@date"/>
  -    </td>
  +    <td><xsl:value-of select="dir:xpath/title"/></td>
  +    <td><xsl:value-of select="@date"/></td>
      </tr>
     </xsl:template>
   
        <xsl:template match="validationResult">
  -             <br/>
  -             <table bgcolor="#0086B2" border="0" cellspacing="1" cellpadding="5" 
width="95%">
  -                     <tr>
  -                             <td class="notes" colspan="2">Schematron 
Validation</td>
  -                     </tr>
  -                     <tr>
  -                             <td bgcolor="white">
  -                                     <table border="0" cellspacing="1" 
cellpadding="3">
  -                                             <tr>
  -                                                     <td class="caption">Scheme</td>
  -                                                     <td 
class="result"><xsl:value-of select="pattern/@name"/></td>
  -                                             </tr>
  +             <div class="block">
  +                     <span class="tab">Schematron Validation</span>
  +                     <div class="content">
  +                             <table>
  +                                     <xsl:for-each select="pattern">
                                                <tr>
  -                                                     <td class="caption">Result</td>
  -                                                     <td class="result">
  +                                                     <td class="col1"><xsl:value-of 
select="@name"/></td>
  +                                                     <td class="col2">
                                                                <xsl:choose>
  -                                                                     <xsl:when 
test="pattern/error"><span class="failure">failure</span></xsl:when>
  +                                                                     <xsl:when 
test="error">
  +                                                                             <span 
class="failure">failure</span>
  +                                                                     </xsl:when>
                                                                        
<xsl:otherwise><span class="success">success</span></xsl:otherwise>
                                                                </xsl:choose>
                                                        </td>
                                                </tr>
  -                                             <xsl:for-each select="pattern/error">
  -                                                     <tr>
  -                                                             <td 
class="caption"><xsl:value-of select="path"/></td>
  -                                                             <td 
class="result"><xsl:value-of select="message"/></td>
  -                                                     </tr>                          
 
  -                                             </xsl:for-each>
  -                                     </table>
  -                             </td>
  -                     </tr>
  -             </table>
  +                                             <xsl:if test="error">
  +                                                     <xsl:for-each select="error">
  +                                                             <tr class="error">
  +                                                                     <td/>
  +                                                                     <td 
class="col1"> <xsl:value-of select="path"/></td>
  +                                                                     <td 
class="col2"><xsl:value-of select="message"/></td>
  +                                                             </tr>                  
         
  +                                                     </xsl:for-each>
  +                                             </xsl:if>
  +                                     </xsl:for-each>
  +                             </table>
  +                     </div>
  +             </div>
     </xsl:template>
    
   <!-- outputs the response from WriteableSourceTransformer -->
     <xsl:template match="source:write">
  -             <br/>
  -             <table bgcolor="#0086B2" border="0" cellspacing="1" cellpadding="5" 
width="95%" class="report">
  -                     <tr>
  -                             <td class="notes" colspan="2">Writing to Source</td>
  -                     </tr>
  -                     <tr>
  -                             <td bgcolor="white">
  -                                     <table bgcolor="white" border="0" 
cellspacing="1" cellpadding="3">
  -                                             <tr>
  -                                                     <td class="caption">Result</td>
  -                                                     <td class="result">
  -                                                             <span 
class="{@result}">
  -                                                                     <xsl:value-of 
select="@result"/>
  -                                                             </span>
  -                                                     </td>
  -                                             </tr>
  -                                             <xsl:if test="@result = 'failed'">
  -                                                     <tr>
  -                                                             <td 
class="caption">Error</td>
  -                                                             <td class="result">
  -                                                                     <span 
class="{@result}">
  -                                                                             
<xsl:value-of select="text()"/>
  -                                                                     </span>
  -                                                             </td>
  -                                                     </tr>                          
         
  -                                             </xsl:if>
  +             <div class="block">
  +                     <span class="tab">Writing to Source</span>
  +                     <div class="content">
  +                             <table>
  +                                     <tr>
  +                                             <td class="col1">Result</td>
  +                                             <td class="col2"><span 
class="{@result}"><xsl:value-of select="@result"/></span></td>
  +                                     </tr>
  +                                     <xsl:if test="@result = 'failed'">
  +                                             <tr class="error">
  +                                                     <td class="col1">Error</td>
  +                                                     <td class="col2"><span 
class="{@result}"><xsl:value-of select="text()"/></span></td>
  +                                             </tr>                                  
 
  +                                     </xsl:if>
  +                                     <tr>
  +                                             <td class="col1">Source</td>
  +                                             <td class="col2"><xsl:value-of 
select="@src"/></td>
  +                                     </tr>
  +                                     <tr>
  +                                             <td class="col1">Action</td>
  +                                             <td class="col2">
  +                                                     <xsl:choose>
  +                                                             <xsl:when 
test="@action = 'none'">None taken</xsl:when>
  +                                                             <xsl:when 
test="@action = 'new'">New file created</xsl:when>
  +                                                             <xsl:when 
test="@action = 'overwritten'">Existing file overwritten</xsl:when>
  +                                                             
<xsl:otherwise>Unknown</xsl:otherwise>
  +                                                     </xsl:choose>
  +                                             </td>
  +                                     </tr>
  +                                     <xsl:if test="@serializer">
                                                <tr>
  -                                                     <td class="caption">Source</td>
  -                                                     <td class="result">
  -                                                             <xsl:value-of 
select="@src"/>
  -                                                     </td>
  +                                                     <td 
class="col1">Serializer</td>
  +                                                     <td class="col2"><xsl:value-of 
select="@serializer"/></td>
                                                </tr>
  -                                             <tr>
  -                                                     <td class="caption">Action</td>
  -                                                     <td class="result">
  -                                                             <xsl:choose>
  -                                                                     <xsl:when 
test="@action = 'none'">None taken</xsl:when>
  -                                                                     <xsl:when 
test="@action = 'new'">New file created</xsl:when>
  -                                                                     <xsl:when 
test="@action = 'overwritten'">Existing file overwritten</xsl:when>
  -                                                                     
<xsl:otherwise>Unknown</xsl:otherwise>
  -                                                             </xsl:choose>
  -                                                     </td>
  -                                             </tr>
  -                                             <xsl:if test="@serializer">
  -                                                     <tr>
  -                                                             <td 
class="caption">Serializer</td>
  -                                                             <td class="result">
  -                                                                     <xsl:value-of 
select="@serializer"/>
  -                                                             </td>
  -                                                     </tr>
  -                                             </xsl:if>
  -                                     </table>
  -                             </td>
  -                     </tr>
  -             </table>
  -             <br/>
  +                                     </xsl:if>
  +                             </table>
  +                     </div>
  +             </div>
     </xsl:template>
   
   </xsl:stylesheet>
  
  
  
  1.8       +245 -70   
xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor-page2html.xsl
  
  Index: editor-page2html.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor-page2html.xsl,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- editor-page2html.xsl      18 Mar 2002 18:27:51 -0000      1.7
  +++ editor-page2html.xsl      22 Mar 2002 12:10:00 -0000      1.8
  @@ -8,9 +8,6 @@
   
    >
   
  -
  -
  -
        <!-- 
                This is the main Editor Stylesheet
                It adapts itself to the particular command being sent in the structure 
of the XML.
  @@ -47,66 +44,254 @@
                        </script>
       </xsl:if>
       
  +    
  +    <!-- this will move into a separate file, when it has settled down -->
       <style><![CDATA[
  -             a{text-decoration:none}
  -             a:hover{text-decoration:underline;color:red}
  -      
body{font-size:12px;font-family:sans-serif,Arial,Tahoma;color:black;background:white;} 
  -      
h1{font-size:18px;font-weight:bold;font-family:sans-serif,Arial,Tahoma;color:black;background:white;}
 
  -                     form{font-size:12px}
  -                     .notify{font-size:15px;background:white;}
  -                     
.notes{font-size:12px;font-weight:bold;color:white;background:#0086B2}
  -                     .result{font-size:12px;color:black;background:white}
  -                     .failure{font-size:12px;font-weight:bold;color:#BB0000}
  -                     .success{font-size:12px;font-weight:bold;color:green}
  -                     .caption{font-size:12px;font-weight:bold;color:black;}
  -                     
textarea{background-color:#EEFFFF;font-size:12px;font-family:geneva,arial,sans-serif;border-color:#0086B2;border-width:1px;padding-left:2px;}
  -                     textarea.hidden{display:none;}
  -                     
input{background-color:#EEFFFF;font-size:12px;font-family:geneva,arial,sans-serif;border-color:#0086B2;border-width:1px;padding-left:2px;}
  -                     
input.submit{background-color:#0086B2;font-size:12px;font-family:geneva,arial,sans-serif;border-color:black;border-width:1px;padding:2px
 6px;margin:10px;font-weight:bold;color:white;}
  -                     
input.button{background-color:#BB0000;font-size:12px;font-family:geneva,arial,sans-serif;border-color:black;border-width:1px;padding:2px
 6px;margin:10px;font-weight:bold;color:white;}
  -                     
.block-title{font-size:12px;font-weight:bold;color:white;background:#0086B2;padding:4px;}
  -                     .row{background:#EEFFFF;}
   
  +     .title
  +     {
  +             text-align: center;
  +             font-size: 18px;
  +             font-weight: bold;
  +             font-family: sans-serif,Arial,Tahoma;
  +             color: black;
  +             background: white;
  +             border-color: black;
  +             border-width: 10px;
  +     }
  +     
  +     .main
  +     {
  +             border: 1px solid #0086B2;
  +             padding: 0px;
  +             margin: 6px;
  +             min-width: 630px;
  +     }
  +     
  +     .head
  +     {
  +             border-bottom: #0086B2;
  +             border-width: 0 0 1px 0;
  +             border-style: none none solid none;
  +             padding: 6px 6px 3px 6px;
  +     }
  +     
  +     .block { padding: 6px; }
  +     
  +     .confirm
  +     {
  +             width: 40%;
  +             margin-left: 50%;
  +             padding: 6px;
  +     }
  +     
  +     .content
  +     {
  +             border: 1px solid #0086B2; 
  +             padding: 6px;
  +             margin: 1px;
  +     }
  + 
  +     tr 
  +     {
  +             padding: 2px 6px 2px 6px;
  +     }
  +             
  +    
  +     .col1
  +     {
  +             font-weight: bold;
  +     }
  +
  +             .error .col1
  +     {
  +             padding: 2px 20px 2px 6px;
  +     }
  +
  +             .error .col2
  +     {
  +             color:#BB0000;
  +             padding: 2px 20px 2px 6px;
  +     }
  +     
  +     .field { }
  +     
  +     .notify
  +     {
  +             font-size: 15px;
  +             text-align: left;
  +     }
  +     
  +     .tools { text-align: right; }
  +     .tool { padding: 6px; }
  +     
  +     .notes
  +     {
  +             font-size: 12px;
  +             font-weight: bold;
  +             color: white;
  +             background: #0086B2;
  +             text-align: left;
  +             padding: 6px 6px 3px 6px;
  +     }
  +     
  +     .foot
  +     {
  +             text-align: center;
  +             font-size: 12px;
  +             margin-top: 50px;
  +     }
  +     
  +     .hspace { margin: 30px; }
  +     #left { float: left; }
  +     #right { float: right; }
  +     #center { text-align: center; }
  +     #row { background: #EEFFFF; }
  +     
  +     .failure
  +     {
  +             font-weight: bold;
  +             color: #BB0000;
  +     }
  +     
  +     .warning
  +     {
  +             font-weight: bold;
  +             color: #BB0000;
  +     }
  +     
  +     .success
  +     {
  +             font-weight: bold;
  +             color: green;
  +     }
  +     
  +     .tab
  +     {
  +             font-size: 12px;
  +             font-weight: bold;
  +             color: white;
  +             background: #0086B2;
  +             padding: 4px 4px 2px 4px;
  +             border: 0px solid #0086B2;
  +             margin: 1px;
  +     }
  +     
  +     .tab a
  +     {
  +             text-decoration: none;
  +             color: white;
  +     }
  +     
  +     .tab a:visited
  +     {
  +             text-decoration: none;
  +             color: white;
  +     }
  +     
  +     .tab a:link
  +     {
  +             text-decoration: none;
  +             color: white;
  +     }
  +     
  +     .tab a:hover
  +     {
  +             text-decoration: underline;
  +             color: red;
  +     }
  +     
  +     a { text-decoration: none; }
  +     
  +     a:hover
  +     {
  +             text-decoration: underline;
  +             color: red;
  +     }
  +     
  +     body
  +     {
  +             font-size: 12px;
  +             font-family: sans-serif,Arial,Tahoma;
  +             color: black;
  +             background: white;
  +     }
  +     
  +     form { font-size: 12px; }
  +     
  +     textarea
  +     {
  +             background-color: #EEFFFF;
  +             font-size: 12px;
  +             font-family: geneva,arial,sans-serif;
  +             border-color: #0086B2;
  +             border-width: 1px;
  +             padding-left: 2px;
  +     }
  +     
  +     textarea.hidden { display: none; }
  +     
  +     input
  +     {
  +             background-color: #EEFFFF;
  +             font-size: 12px;
  +             font-family: geneva,arial,sans-serif;
  +             border-color: #0086B2;
  +             border-width: 1px;
  +             padding-left: 2px;
  +     }
  +     
  +     input.submit
  +     {
  +             background-color: #0086B2;
  +             font-size: 12px;
  +             font-family: geneva,arial,sans-serif;
  +             border-color: black;
  +             border-width: 1px;
  +             padding: 2px 6px;
  +             font-weight: bold;
  +             color: white;
  +     }
  +     
  +     input.button
  +     {
  +             background-color: #BB0000;
  +             font-size: 12px;
  +             font-family: geneva,arial,sans-serif;
  +             border-color: black;
  +             border-width: 1px;
  +             padding: 2px 6px;
  +             font-weight: bold;
  +             color: white;
  +     }
      ]]>
       </style>
       </head>
  -    <body> <center>
  -     <h1><xsl:value-of select="$config/@title"/> - site editor demo</h1>
  -     <table border="0" cellspacing="1" cellpadding="0" bgcolor="#0086B2" 
width="90%">
  -      <tr>
  -       <td>
  -                             <table border="0" cellspacing="0" cellpadding="5" 
width="100%" bgcolor="white">
  -                                     <tr>
  -                                             <td class="notify"><b><xsl:value-of 
select="$config/notify[@behaviour = $behaviour]"/> : </b> <xsl:value-of 
select="$target"/></td>
  -                                             <xsl:apply-templates 
select="$config/tools[@behaviour = $behaviour]"/>
  -                                     </tr>
  -                             </table>
  -       </td>
  -      </tr>
  -      <tr>
  -       <td bgcolor="white">
  -             <center>
  -                             <xsl:apply-templates select="editor/validationResult"/>
  -        <xsl:choose>
  -             <!-- add your "sub-editors" here -->
  -                                     <xsl:when test="editor[@sub = 
'alpha']"><xsl:apply-templates select="editor/instance/*" 
mode="sub-editor"/></xsl:when>
  -                                     <xsl:when test="editor[@sub = 
'bravo']"><xsl:apply-templates select="editor/instance/*" 
mode="sub-editor"/></xsl:when>
  -                                     <xsl:otherwise><h1 class="failure">Houston, we 
have a problem.</h1></xsl:otherwise>
  -                             </xsl:choose>
  -                             </center>
  -       </td>
  -      </tr>
  -      <tr>
  -       <td>
  -                             <table border="0" cellspacing="0" cellpadding="5" 
width="100%">
  -                                     <tr>
  -                                             <td class="notes"><xsl:apply-templates 
select="$config/notes[@behaviour = $behaviour]"/></td>
  -                                     </tr>
  -                             </table>
  -       </td>
  -      </tr>
  -     </table>
  -     </center>
  +    <body> 
  +                     <div class="title"><xsl:value-of select="$config/@title"/> - 
site editor demo</div>
  +                     <div class="main">
  +                             <div class="head">
  +                                     <div class="notify" id="left"><b><xsl:value-of 
select="$config/notify[@behaviour = $behaviour]"/> : </b> <xsl:value-of 
select="$target"/></div>
  +                                     <div class="tools"><xsl:apply-templates 
select="$config/tools[@behaviour = $behaviour]"/></div>
  +                             </div>
  +                             <div class="block">
  +                                     <xsl:apply-templates 
select="editor/validationResult"/>
  +                                     <xsl:choose>
  +                                             <!-- add your "sub-editors" here -->
  +                                             <xsl:when test="editor[@sub = 
'alpha']"><xsl:apply-templates select="editor/instance/*" 
mode="sub-editor"/></xsl:when>
  +                                             <xsl:when test="editor[@sub = 
'bravo']"><xsl:apply-templates select="editor/instance/*" 
mode="sub-editor"/></xsl:when>
  +                                             <xsl:otherwise><div 
class="warning"><br/>Houston, we have a problem.<br/></div></xsl:otherwise>
  +                                     </xsl:choose>
  +                             </div>
  +                             <div class="notes"><xsl:apply-templates 
select="$config/notes[@behaviour = $behaviour]"/></div>
  +                     </div>
  +                     <div class="foot">
  +                             &lt;!-- jeremy at apache dot org --&gt;<br/><br/>
  +                             Copyright &#169; 1999-2002 <a 
href="http://www.apache.org";>The Apache Software Foundation</a>.<br/>
  +                             All rights reserved.
  +                     </div>
  +             </body>   
  +    
   
   <!-- debug   <table>
                                <tr>
  @@ -120,15 +305,6 @@
                                </tr>
                        </table>        -->
                <!-- / debug  -->
  -             
  -              <p align="center">
  -     <font size="-1">
  -      Copyright &#169; 1999-2002 <a href="http://www.apache.org";>The Apache 
Software Foundation</a>.<br/>
  -      All rights reserved.
  -     </font>
  -    </p>
  -
  -    </body>
      </html>
     </xsl:template>
   
  @@ -137,7 +313,7 @@
                <xsl:for-each select="tool">
                        <xsl:variable name="com" select="@command"/>
                        <xsl:variable name="command" 
select="$config/command[@behaviour = $com]"/>
  -                     <td width="20">
  +                     <span class="tool">
                                <a title="{$command/@tip}">
                                        <xsl:attribute name="href">
                                                <xsl:if test="$is-form = 
'true'"><xsl:text>javascript:exit('</xsl:text></xsl:if>
  @@ -145,12 +321,11 @@
                                                        <xsl:when test="$com = 
'new'"><xsl:value-of select="$command-base"/><xsl:value-of 
select="$command/text()"/><xsl:value-of select="$newfile"/></xsl:when>
                                                        <xsl:otherwise><xsl:value-of 
select="$command-base"/><xsl:value-of select="$command/text()"/><xsl:value-of 
select="$target"/></xsl:otherwise>
                                                </xsl:choose>
  -                                             
                                                <xsl:if test="$is-form = 
'true'"><xsl:text>');</xsl:text></xsl:if>
                                        </xsl:attribute>
                                        <img src="{concat('image/',$command/@icon)}" 
border="0"/>
                                </a>
  -                     </td>
  +                     </span>
                </xsl:for-each>
        </xsl:template>
   
  
  
  
  1.6       +7 -2      
xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor-utils.xsl
  
  Index: editor-utils.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor-utils.xsl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- editor-utils.xsl  17 Mar 2002 21:26:55 -0000      1.5
  +++ editor-utils.xsl  22 Mar 2002 12:10:00 -0000      1.6
  @@ -7,8 +7,13 @@
        <xsl:variable name="sub" select="/slash-edit/editor/@sub"/>
        <xsl:variable name="command-base" select="/slash-edit/editor/@command-base"/>
        <xsl:variable name="target" select="/slash-edit/editor/instance/@target"/>
  -     <xsl:variable name="behaviour" 
select="/slash-edit/editor/instance/@behaviour"/>
  -
  +     <xsl:variable name="behaviour">
  +             <xsl:choose>
  +                     <xsl:when test="/slash-edit/editor/instance/@behaviour 
!=''"><xsl:value-of select="/slash-edit/editor/instance/@behaviour"/></xsl:when>
  +                     <xsl:otherwise>error</xsl:otherwise>
  +             </xsl:choose>
  +     </xsl:variable>
  +     
   <!-- the aggregated editor-config document -->
        <xsl:variable name="config" select="/slash-edit/config"/>
   
  
  
  
  1.3       +3 -0      
xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor2writer.xsl
  
  Index: editor2writer.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/editor2writer.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- editor2writer.xsl 17 Mar 2002 21:26:55 -0000      1.2
  +++ editor2writer.xsl 22 Mar 2002 12:10:00 -0000      1.3
  @@ -42,6 +42,9 @@
        </editor>
   </xsl:template>
   
  +<!-- copy content
  +     <xsl:template match="para"><para i="t"><xsl:value-of 
disable-output-escaping="yes" select="text()"/></para></xsl:template>
  +     -->
   <!-- copy anything -->
     <xsl:template match="@*|node()" priority="-2"><xsl:copy><xsl:apply-templates 
select="@*|node()"/></xsl:copy></xsl:template>
     <xsl:template match="text()" priority="-1"><xsl:value-of 
select="."/></xsl:template>
  
  
  
  1.5       +1 -2      
xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/file2editor.xsl
  
  Index: file2editor.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/file2editor.xsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- file2editor.xsl   17 Mar 2002 21:26:55 -0000      1.4
  +++ file2editor.xsl   22 Mar 2002 12:10:00 -0000      1.5
  @@ -4,9 +4,8 @@
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    >
        <xsl:include href="generation-utils.xsl"/>                                     
                         <!-- utility templates and variables -->
  -
        <xsl:param name="target"/>
  -      
  +
        <xsl:template match="/">
                <editor sub="{$sub}" command-base="{$command-base}">
                        <instance behaviour="{$behaviour}" target="{$target}">
  
  
  
  1.5       +1 -1      
xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/request2editor.xsl
  
  Index: request2editor.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/request2editor.xsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- request2editor.xsl        17 Mar 2002 21:26:55 -0000      1.4
  +++ request2editor.xsl        22 Mar 2002 12:10:00 -0000      1.5
  @@ -6,7 +6,6 @@
    >
   
        <xsl:include href="generation-utils.xsl"/>                                     
                         <!-- utility templates and variables -->
  -
        <xsl:variable name="target" 
select="request:request/request:requestParameters/request:parameter[@name = 
'target']/request:value"/>
   
   <!-- 
  @@ -22,6 +21,7 @@
        NB. the indentation of these templates effects the output document
                
   -->
  +
   
   <xsl:template match="/">
   <editor sub="{$sub}" command-base="{$command-base}">
  
  
  
  1.5       +1 -2      
xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/stream2editor.xsl
  
  Index: stream2editor.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/editor/stylesheets/stream2editor.xsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- stream2editor.xsl 17 Mar 2002 21:26:55 -0000      1.4
  +++ stream2editor.xsl 22 Mar 2002 12:10:00 -0000      1.5
  @@ -4,9 +4,8 @@
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    >
        <xsl:include href="generation-utils.xsl"/>                                     
                         <!-- utility templates and variables -->
  -
        <xsl:param name="target"/>
  -
  +     
   <!-- 
   
        This StyleSheet copies the output of the StreamGenerator into the 'editor'
  
  
  
  1.4       +65 -23    
xml-cocoon2/src/scratchpad/webapp/mount/editor/stylesheets/simple-page2html.xsl
  
  Index: simple-page2html.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/editor/stylesheets/simple-page2html.xsl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- simple-page2html.xsl      22 Feb 2002 22:15:35 -0000      1.3
  +++ simple-page2html.xsl      22 Mar 2002 12:10:00 -0000      1.4
  @@ -2,7 +2,7 @@
   
   <xsl:stylesheet version="1.0" 
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  -     xmlns:xfwt="http://apache.org/cocoon/xfwt/1.0";
  +     xmlns:source="http://apache.org/cocoon/source/1.0";
   >
   
     <xsl:param name="view-source"/>
  @@ -13,6 +13,21 @@
        <title>
         <xsl:value-of select="title"/>
        </title>
  +              <style><![CDATA[
  +              <!--
  +                             a{text-decoration:none}
  +                             a:hover{text-decoration:underline}
  +                             body{font-family : 
sans-serif,Arial,Tahoma;color:black;background-color : white;} 
  +                             form{font-size:12px;background:#0086B2}
  +                             .notify{font-size:15px;}
  +                             
.notes{font-size:12px;font-weight:bold;color:white;background:#0086B2}
  +                             .result{font-size:12px;color:black}
  +                             .failure{font-size:12px;font-weight:bold;color:red}
  +                             .success{font-size:12px;color:black}
  +                             .caption{font-size:12px;font-weight:bold;color:black;}
  +                             textarea{font-size:12px;font-family : 
geneva,arial,sans-serif;}
  +              //-->]]>
  +              </style>
       </head>
       <body bgcolor="white" alink="red" link="blue" vlink="blue" 
style="font-family:trebuchet,arial,geneve,sans serif">
        <xsl:apply-templates/>
  @@ -26,7 +41,7 @@
                                <xsl:when test="$view-source">
                                        <a>
                                                <xsl:attribute 
name="href">../../../view-source?filename=mount/editor/<xsl:value-of 
select="$view-source"/></xsl:attribute>
  -                                             <xsl:attribute 
name="target">xfwt</xsl:attribute>
  +                                             <xsl:attribute 
name="target">source</xsl:attribute>
                                                <xsl:apply-templates/>
                                        </a>
                                </xsl:when>
  @@ -47,27 +62,54 @@
      </blockquote>
     </xsl:template>
   
  -
  -  <xsl:template match="xfwt:write">
  -   <p align="left">
  -    <xsl:choose>
  -     <xsl:when test="@result = 'failed'">
  -                             <b>Result</b>: <span style="color:red;"><xsl:value-of 
select="@result"/></span><br/>
  -                             <b>Error</b>: <xsl:value-of select="text()"/><br/>
  -     </xsl:when>
  -     <xsl:otherwise>
  -                             <b>Result</b>: <span 
style="color:green;"><xsl:value-of select="@result"/></span><br/>
  -     </xsl:otherwise>
  -    </xsl:choose>
  -    <b>Source</b>:  <xsl:value-of select="@src"/><br/>
  -    <b>Action</b>:  
  -    <xsl:choose>
  -     <xsl:when test="@action = 'new'">New file created</xsl:when>
  -     <xsl:otherwise>Existing file overwritten</xsl:otherwise>
  -    </xsl:choose>
  -    <br/>
  -    <b>Serializer</b>:  <xsl:value-of select="@serializer"/>
  -   </p>
  +  <xsl:template match="source:write">
  +             <table border="0" cellspacing="0" cellpadding="5" width="100%">
  +                     <tr>
  +                             <td class="caption">Result</td>
  +                             <td class="result">
  +                                     <span class="{@result}">
  +                                             <xsl:value-of select="@result"/>
  +                                     </span>
  +                             </td>
  +                     </tr>
  +                     <xsl:if test="@result = 'failed'">
  +                             <tr>
  +                                     <td class="caption">Error</td>
  +                                     <td class="result">
  +                                             <span class="{@result}">
  +                                                     <xsl:value-of select="text()"/>
  +                                             </span>
  +                                     </td>
  +                             </tr>                                   
  +                     </xsl:if>
  +                     <tr>
  +                             <td class="caption">Source</td>
  +                             <td class="result">
  +                                     <xsl:value-of select="@src"/>
  +                             </td>
  +                     </tr>
  +                     <xsl:if test="@action">
  +                             <tr>
  +                                     <td class="caption">Action</td>
  +                                     <td class="result">
  +                                             <xsl:choose>
  +                                                     <xsl:when test="@action = 
'none'">None taken</xsl:when>
  +                                                     <xsl:when test="@action = 
'new'">New file created</xsl:when>
  +                                                     <xsl:when test="@action = 
'overwritten'">Existing file overwritten</xsl:when>
  +                                                     
<xsl:otherwise>Unknown</xsl:otherwise>
  +                                             </xsl:choose>
  +                                     </td>
  +                             </tr>
  +                     </xsl:if>
  +                     <xsl:if test="@serializer">
  +                             <tr>
  +                                     <td class="caption">Serializer</td>
  +                                     <td class="result">
  +                                             <xsl:value-of select="@serializer"/>
  +                                     </td>
  +                             </tr>
  +                     </xsl:if>
  +             </table>
     </xsl:template>
   
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to