You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Miroslav Mocek <mm...@seznam.cz> on 2005/09/29 13:25:33 UTC
how to use own xml format and own xslt?
Hello,
I have a set of XML files, in my own vocabulary (with schema), I have
appropriate XSLT, which converts the XML sources to HTML files. It
creates also the indexes. I have my own easy commandline, which creates
the site.
Now I would like to switch my commandline with more robust (I believe)
and more featured forrest. Is it possible?
How can I customize forrest to accept my own XML schemas and XSLT
templates to use them and produce HTML in right place?
Is there some documentation on this point?
Or is it completely wrong idea?
Thanks Mirek
Re: how to use own xml format and own xslt?
Posted by Ross Gardler <rg...@apache.org>.
Miroslav Mocek wrote:
> I've looked at the simpler way and if I understand correctly, it means,
> that
>
> - my XML document will be processed into HTML (by my existing stylesheets).
> - then it will be processed by forrest stylesheets into "document"
> format and
> - then other forrest stylesheets recreate the final HTML.
>
> How does look like the final HTML?
It is a cleaned version of the HTML. Cleaned in the sense that content
with no equivalent in XDoc will have gone.
> It's the menus and navigation items
> all around and somewhere inside is my original HTML (everything from
> body element, probably) as it was before?
Yes
> What about my own CSS, which is referenced from the original HTML?
This will no longer be referenced, but the HTML produced will still have
the classes defined (at least I think this is the case, comeone may
correct me - conduct tests before going too far down the line).
You can place the CSS in the extra-css section of skinconf.xml
> Will
> it be included? What about colisions in names?
There is no provision to handle name collissions. You would have to
resolve these in your stylesheets. The new views technology solves this
problem, but that is development stuff so you may not want to use it.
Ross
Re: how to use own xml format and own xslt?
Posted by Miroslav Mocek <mm...@seznam.cz>.
I've looked at the simpler way and if I understand correctly, it means,
that
- my XML document will be processed into HTML (by my existing stylesheets).
- then it will be processed by forrest stylesheets into "document"
format and
- then other forrest stylesheets recreate the final HTML.
How does look like the final HTML? It's the menus and navigation items
all around and somewhere inside is my original HTML (everything from
body element, probably) as it was before? If this is true, I would try it.
What about my own CSS, which is referenced from the original HTML? Will
it be included? What about colisions in names?
Thanks for suggestions,
Mirek
Ross Gardler wrote:
> Miroslav Mocek wrote:
>
>> Hello,
>>
>> I have a set of XML files, in my own vocabulary (with schema), I have
>> appropriate XSLT, which converts the XML sources to HTML files. It
>> creates also the indexes. I have my own easy commandline, which
>> creates the site.
>>
>> Now I would like to switch my commandline with more robust (I
>> believe) and more featured forrest. Is it possible?
>> How can I customize forrest to accept my own XML schemas and XSLT
>> templates to use them and produce HTML in right place?
>
>
> The most robust way would be to build an input plugin that handles
> your custom schema. We provide an html2document.xsl that will convert
> your HTML to XDoc for internal processing (assuming they create well
> formed HTML).
>
> http://forrest.apache.org/pluginDocs/plugins_0_80/pluginInfrastructure.html
>
> http://forrest.apache.org/docs_0_80/howto/howto-buildPlugin.html
>
> Alternatively, you can just add support in a single project by
> following the instructions at
> http://forrest.apache.org/docs_0_80/your-project.html#adding_new_content_type
>
>
> (again you will want to use our html2document.xsl to leverage your
> HTML output.
>
> Ross
>
Re: how to use own xml format and own xslt?
Posted by Ross Gardler <rg...@apache.org>.
Miroslav Mocek wrote:
> Hello,
>
> I have a set of XML files, in my own vocabulary (with schema), I have
> appropriate XSLT, which converts the XML sources to HTML files. It
> creates also the indexes. I have my own easy commandline, which creates
> the site.
>
> Now I would like to switch my commandline with more robust (I believe)
> and more featured forrest. Is it possible?
> How can I customize forrest to accept my own XML schemas and XSLT
> templates to use them and produce HTML in right place?
The most robust way would be to build an input plugin that handles your
custom schema. We provide an html2document.xsl that will convert your
HTML to XDoc for internal processing (assuming they create well formed
HTML).
http://forrest.apache.org/pluginDocs/plugins_0_80/pluginInfrastructure.html
http://forrest.apache.org/docs_0_80/howto/howto-buildPlugin.html
Alternatively, you can just add support in a single project by following
the instructions at
http://forrest.apache.org/docs_0_80/your-project.html#adding_new_content_type
(again you will want to use our html2document.xsl to leverage your HTML
output.
Ross