shannon     2002/07/03 15:47:50

  Modified:    src/documentation/xdocs/faq Tag: cocoon_2_0_3_branch
                        faq-configure-c2.xml faq-serializers.xml
                        faq-sitemap.xml faq-transformers.xml faq-xslt.xml
  Log:
  sync with HEAD
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +19 -3     xml-cocoon2/src/documentation/xdocs/faq/faq-configure-c2.xml
  
  Index: faq-configure-c2.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/faq/faq-configure-c2.xml,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- faq-configure-c2.xml      7 Jun 2002 19:45:13 -0000       1.1.2.1
  +++ faq-configure-c2.xml      3 Jul 2002 22:47:50 -0000       1.1.2.2
  @@ -5,7 +5,7 @@
   
   <faq>
    <question>
  -  How do i setup my own .roles file?
  +  How do I setup my own .roles file?
    </question>
    <answer>
     <p>
  @@ -36,7 +36,7 @@
   
   <faq>
     <question>
  -  Where do i setup LogKit in Cocoon?
  +  Where do I setup LogKit in Cocoon?
     </question>
     <answer>
     <p>1. <code>{cocoon}/WEB-INF/logkit.xconf</code>:</p>
  @@ -65,7 +65,23 @@
     </answer>
   </faq>
   
  -
  +<faq>
  +<question>
  +How can I change the physical location of my upload directory?
  +</question>
  +<answer>
  +  <p>Look in web.xml file located in &lt;your-webapp&gt;/WEB-INF. There you will 
find the following snippet:</p>
  +  <source><![CDATA[
  +    <init-param>
  +      <param-name>upload-directory</param-name>
  +      <param-value>/WEB-INF/work/upload-dir</param-value>
  +    </init-param>
  +]]></source>
  +  <p>
  +The above snippet shows the default path to the upload directory, specified within 
&lt;param-value&gt;. Replace it with a different path to your upload directory, 
relative to the context path of the servlet. 
  +  </p>
  +</answer>
  +</faq>
   
   
   </faqs>
  
  
  
  1.3.2.2   +63 -0     xml-cocoon2/src/documentation/xdocs/faq/faq-serializers.xml
  
  Index: faq-serializers.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/faq/faq-serializers.xml,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- faq-serializers.xml       7 Jun 2002 19:45:13 -0000       1.3.2.1
  +++ faq-serializers.xml       3 Jul 2002 22:47:50 -0000       1.3.2.2
  @@ -56,7 +56,70 @@
   
   </answer>
   
  +</faq>
  +
  +<faq>
  + <question>
  +How can I remove the DTD declaration at the top of my HTML
  +pages created from pipelines with the default (HTML) serializer?
  + </question>
  +
  + <answer>
  +  <p>
  +Within the map:components section of sitemap.xmap, adjust the configuration of your 
HTML serializer component as follows.
  +  </p>
  +<source><![CDATA[
  +<map:serializers default="html">
  +
  +  <map:serializer name="html" mime-type="text/html; charset=ISO-8859-1"
  +     src="org.apache.cocoon.serialization.HTMLSerializer">
  +    <encoding>ISO-8859-1</encoding>
  +    <omit-xml-declaration>true</omit-xml-declaration>
  +  </map:serializer>
  +   
  +  <!-- other serializers -->
  +   
  +</map:serializers>
  +]]></source>
  +
  +  <note>
  +Consider using the XMLSerializer in your pipeline. The XMLSerializer will not write 
a DocType Declaration.
  +  </note>
  +  
  +</answer>
  +
  +</faq>
  +
  +<faq>
  + <question>
  +How can I remove namespaces from my xml files?
  + </question>
  +
  + <answer>
  +  <p>
  +Sometimes adding xsl:exclude-result-prefixes attributes
  +to the &lt;xsl:stylesheet&gt; or literal result element is not effective
  +in removing all namespace declarations. For example, namespace nodes copied 
  +from the source document within &lt;xsl:copy&gt; or &lt;xsl:copy-of&gt; 
instructions 
  +(commonly found in catch-all stylesheet templates) will not be excluded.
  +  </p> 
  +  <p>
  +There are two approaches to this problem. 
  +  </p> 
  +    <p>
  +One approach is to extend your serializer component and override the 
startPrefixMapping and endPrefixMapping methods to do nothing. This will remove 
<strong>all</strong> namespaces from the serialized output. Since your serializer will 
no longer be processing namespaces, this theoretically will improve performance ever 
so slightly. You could generalize this approach by using the serializer's 
configuration method to declare namespaces to be excluded.
  +  </p>
  + <p>
  +Another approach is to use an interim transformation step in your pipeline with a 
stylesheet described <link href="faq-xslt.html#faq-5">here</link>.
  +  </p>
  +
  +  
  +</answer>
   
   </faq>
  +
  +
  +
  +
   
   </faqs>
  
  
  
  1.4.2.2   +0 -16     xml-cocoon2/src/documentation/xdocs/faq/faq-sitemap.xml
  
  Index: faq-sitemap.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/faq/faq-sitemap.xml,v
  retrieving revision 1.4.2.1
  retrieving revision 1.4.2.2
  diff -u -r1.4.2.1 -r1.4.2.2
  --- faq-sitemap.xml   7 Jun 2002 19:45:13 -0000       1.4.2.1
  +++ faq-sitemap.xml   3 Jul 2002 22:47:50 -0000       1.4.2.2
  @@ -185,22 +185,6 @@
   </faq>
   
   <faq>
  - <question>I want to use the XXX matcher/serializer/selecter/etc but there's no
  -   examples. :(</question>
  - <answer>
  -   <p>Check the sample webapps which come with Cocoon. Review the documentation.
  -     Check both the cocoon-users and cocoon-dev list archives. If it hasn't been 
resolved before, <strong>first</strong>
  -     email cocoon-users and, after a <strong>reasonable</strong> (i.e. one or two
  -     days) length of time (remember not everyone lives in your timezone) email
  -     the cocoon-dev list.</p>
  -   <p>Please don't cross-post to both the user and dev groups. Very few people
  -     like getting bombarded!</p>
  -   <p>Oh, and once you do get it working, how about documenting it and
  -     contributing it back to the community?</p>
  - </answer>
  -</faq>
  -
  -<faq>
     <question>When I add an action to a pipeline Cocoon returns an
     error.</question>
     <answer>
  
  
  
  1.1.2.3   +2 -1      xml-cocoon2/src/documentation/xdocs/faq/faq-transformers.xml
  
  Index: faq-transformers.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/faq/faq-transformers.xml,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- faq-transformers.xml      21 Jun 2002 22:55:21 -0000      1.1.2.2
  +++ faq-transformers.xml      3 Jul 2002 22:47:50 -0000       1.1.2.3
  @@ -37,7 +37,8 @@
     <ul>
       <li>Implements the W3C XInclude specification.</li>
       <li>Allows you to include text or xml content (via parse="text|xml").</li>
  -    <li>Allows you to use xpointer syntax (via '#' or xpointer() syntax) within 
href attribute.</li>
  +    <li>Allows you to use XPointer syntax (via '#' or XPointer() syntax) within 
href attribute. However, support of XPointer requires random access to the object 
model of XML
  +document to be included. Thus, it is expensive to construct in runtime. If you are 
including a whole document, it's better to use CInclude which supports straightforward 
text inclusion.</li>
       <li>Has only one implementation, XIncludeTransformer, which is 
<strong>not</strong> cacheable.</li>
     </ul>
     <p>
  
  
  
  1.2.2.3   +44 -0     xml-cocoon2/src/documentation/xdocs/faq/faq-xslt.xml
  
  Index: faq-xslt.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/faq/faq-xslt.xml,v
  retrieving revision 1.2.2.2
  retrieving revision 1.2.2.3
  diff -u -r1.2.2.2 -r1.2.2.3
  --- faq-xslt.xml      19 Jun 2002 20:56:42 -0000      1.2.2.2
  +++ faq-xslt.xml      3 Jul 2002 22:47:50 -0000       1.2.2.3
  @@ -93,6 +93,50 @@
     </answer>
   </faq>
   
  +<faq>
  + <question>
  +How can I remove namespaces from my xml files?
  + </question>
  +
  + <answer>
  +  <p>
  +Sometimes adding xsl:exclude-result-prefixes attributes
  +to the &lt;xsl:stylesheet&gt; or literal result element is not effective
  +in removing all namespace declarations. For example, namespace nodes copied 
  +from the source document within &lt;xsl:copy&gt; or &lt;xsl:copy-of&gt; 
instructions 
  +(commonly found in catch-all stylesheet templates) will not be excluded.
  +  </p> 
  +  <p>
  +There are two approaches to this problem. 
  +  </p> 
  +   <p>
  +One approach is to add a transformation step in your pipeline (or adjust your final 
stylesheet) with the following:
  +  </p>
  +<source><![CDATA[
  +<?xml version="1.0" encoding="UTF-8"?>
  +<xsl:stylesheet version="1.0"
  +xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
  +  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
  +    <xsl:template match="*">
  +      <!-- remove element prefix (if any) -->
  +      <xsl:element name="{local-name()}">
  +        <!-- process attributes -->
  +        <xsl:for-each select="@*">
  +          <!-- remove attribute prefix (if any) -->
  +          <xsl:attribute name="{local-name()}">
  +            <xsl:value-of select="."/>
  +          </xsl:attribute>
  +        </xsl:for-each>
  +        <xsl:apply-templates/>
  +      </xsl:element>
  +  </xsl:template>
  +</xsl:stylesheet>
  +]]></source>
  + <p>
  +Another approach is to extend your serializer component, described <link 
href="faq-serializers.html#faq-4">here</link>.
  +  </p>
  +</answer>
  +</faq>
   
   
   </faqs>
  
  
  

----------------------------------------------------------------------
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