You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Dezbah Duchicela <de...@us.ibm.com> on 2006/06/15 20:15:30 UTC

Making stylesheet for the document xml files





I want to take the document xml files stored in the content folder with the
filename index_en.xml and use these xml files but create my own stylesheet
for them. It seems like these xml files are in some sort of html language
already (after you edit the document with Kupu). So I was wondering if this
was possible and if someone had ideas on how to do this becuase it is a
back way to go.

thanks
dezbah

Re: Making stylesheet for the document xml files

Posted by Doug Chestnut <dh...@virginia.edu>.

solprovider@apache.org wrote:
> [...]
> == Lenya 1.4
> Ask somebody else.
> 
Use the webDAV interface to GET the raw xml:
http://lenya.zones.apache.org:9999/default/webdav/index (lenya/levi)

You don't have to use the xhtml resource type, make a resource type out 
of your favorite xml lang.

--Doug

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Making stylesheet for the document xml files

Posted by so...@apache.org.
On 6/19/06, Dezbah Duchicela <de...@us.ibm.com> wrote:
> Thanks solprovider! I was actually wanting the pure xml file, because the purpose of lenya was to have users graphical make the xml files and then we would take those and export them to an ftp and I would create my own xsl stylesheet to use to conform to our company standards. Is this at all possible? I wanted the pure xml because I have been trying to create a stylesheet with the index_en.xml files provided in the authoring section of my publication and it is not working because the html tags are messing up the xsl reader.
---

The easiest method is to directly access the XML files.  This may
cause file-locking issues on some operating systems, and would bypass
Lenya.

A better method is to add a pipeline to access the XML through HTTP.
(I did not test any of the following.)

== Lenya 1.2
URL: http://server/pub/live/docpath/docid_lang.xml
FILE: {pub}/publication-sitemap.xmap
ADD:
   <map:match pattern="**_*.xml">
      <map:generate src="content/{1}/index_{2}.xml"/>
      <map:serialize type="xml"/>
   </map:match>

You could add the functionality as a Usecase rather than add it to the
main pipeline. (See the link at the end.)  And you might handle URLs
that do not specify the language.

== Lenya 1.3
URL: http://server/pub/getxml/live/docpath/docid
FILE: modules/getxml/module.xmap
<?xml version="1.0" encoding="UTF-8"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  <map:pipelines>
    <map:pipeline>
      <map:match pattern="{module:module}/**.*"><!-- Remove extension -->
        <map:generate src="content:://{1}"/>
        <map:serialize type="xml"/>
      </map:match>
      <map:match pattern="{module:module}/**"><!-- No extension -->
        <map:generate src="content:://{1}"/>
        <map:serialize type="xml"/>
      </map:match>
    </map:pipeline>
  </map:pipelines>
</map:sitemap>

content:: (double colon) guarantees the result is XML, so it returns
the META information for type="file", such as graphics.  Lenya1.3 uses
the default language if the language is not specified in the URL.

== Lenya 1.4
Ask somebody else.

==
Using a Lenya1.2 Usecase or Lenya1.3 Module allows you to apply
different XSLT to the content.  For 1.2, you might read:
http://solprovider.com/lenya/multiple

solprovider

P.S. I thought IBM used Domino for all its CMS needs.  Domino does
much more than Lenya.  What are you doing here?  I do not want to
discourage you, but my last contract was a Domino infrastructure
project for IBM.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Making stylesheet for the document xml files

Posted by Dezbah Duchicela <de...@us.ibm.com>.
Thanks solprovider! I was actually wanting the pure xml file, because the
purpose of lenya was to have users graphical make the xml files and then we
would take those and export them to an ftp and I would create my own xsl
stylesheet to use to conform to our company standards. Is this at all
possible? I wanted the pure xml because I have been trying to create a
stylesheet with the index_en.xml files provided in the authoring section of
my publication and it is not working
because the html tags are messing up the xsl reader.

Thanks in advance for your help.
Dezbah Duchicela




                                                                           
             solprovider@apach                                             
             e.org                                                         
             Sent by:                                                   To 
             solprovider@gmail         user@lenya.apache.org               
             .com                                                       cc 
                                                                           
                                                                   Subject 
             06/16/2006 05:52          Re: Making stylesheet for the       
             PM                        document xml files                  
                                                                           
                                                                           
             Please respond to                                             
             user@lenya.apache                                             
                   .org                                                    
                                                                           
                                                                           




On 6/15/06, Dezbah Duchicela <de...@us.ibm.com> wrote:
> I want to take the document xml files stored in the content folder with
the
> filename index_en.xml and use these xml files but create my own
stylesheet
> for them. It seems like these xml files are in some sort of html language
> already (after you edit the document with Kupu). So I was wondering if
this
> was possible and if someone had ideas on how to do this because it is a
back
> way to go.

You are describing Lenya1.2.  The "default" Publication in Lenya1.2
starts with the XHTML content files, aggregates some Navigation
Elements, transforms with {pub}/xslt/page2xhtml.xsl, and serializes as
HTML.  There are also a few extras such as caching and checking if the
request exists, but most of the display pipeline is transforming
content into HTML.

So yes, it is possible.

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Making stylesheet for the document xml files

Posted by so...@apache.org.
On 6/15/06, Dezbah Duchicela <de...@us.ibm.com> wrote:
> I want to take the document xml files stored in the content folder with the
> filename index_en.xml and use these xml files but create my own stylesheet
> for them. It seems like these xml files are in some sort of html language
> already (after you edit the document with Kupu). So I was wondering if this
> was possible and if someone had ideas on how to do this because it is a back
> way to go.

You are describing Lenya1.2.  The "default" Publication in Lenya1.2
starts with the XHTML content files, aggregates some Navigation
Elements, transforms with {pub}/xslt/page2xhtml.xsl, and serializes as
HTML.  There are also a few extras such as caching and checking if the
request exists, but most of the display pipeline is transforming
content into HTML.

So yes, it is possible.

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org