KGKf / kettle-cookbook

Automatically exported from code.google.com/p/kettle-cookbook
GNU Lesser General Public License v3.0
0 stars 0 forks source link

trunk not linking css and javascipt correctly #59

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Running it against pentaho 4.2.1 release on windows.
running in spoon.
(have work around for issue 58)

it seems the the tool assumes a flat file structure

if you have your etl's under sub folders

looking at the generated html it's generating a document-root of ..

      <!--
            Debugging info - please ignore
            param_filename: "C:\src\eeditions\trunk\etl\pentaho\amazon\input\amazon_remit_rate_lkp.ktr"
            normalized_filename: "C:\src\eeditions\trunk\etl\pentaho\amazon\input\amazon_remit_rate_lkp.ktr"
            file: 1
            document: 1
            document-element: transformation
            name: 
            relative-path: ""
            documentation-root: ".."
        -->
      <title>Kettle Documentation: transformation ""</title>
      <link rel="shortcut icon" type="image/x-icon" href="../images/spoon.">
      <link rel="stylesheet" type="text/css" href="../css/default.css">
      <link rel="stylesheet" type="text/css" href="../css/kettle.css">
      <link rel="stylesheet" type="text/css" href="../css/transformation.css">
      <link rel="stylesheet" type="text/css" href="../css/shCoreDefault.css">

Original issue reported on code.google.com by tecro...@gmail.com on 11 Jun 2013 at 11:44

GoogleCodeExporter commented 8 years ago
fixing the path gets the css and JS loaded.

i think you might need to pass in a depth indicator or something.

Original comment by tecro...@gmail.com on 11 Jun 2013 at 11:59

GoogleCodeExporter commented 8 years ago
Tecronin, I don't understand this: 

"it seems the the tool assumes a flat file structure"

Cookbook was designed to crawl folders downward starting at the target folder. 
It does this recursively because the "include subfolders" option of the get 
files step was not available in older kettle versions. So if you're not seeing 
that it finds subfolders of the target folder, this is a bug. 

What do you mean by "fixing the path"? There is no depth indicator, it was 
designed to crawl until there's nothing to crawl anymore.

Original comment by roland.bouman on 12 Jun 2013 at 1:15

GoogleCodeExporter commented 8 years ago
yeah i dug in and found the template that sets it.
not sure why i had to do it this way. i had changed create-index.ktr to set 
file_separator as a constant /. i had to reset it in via a string replace.

Original comment by tecro...@gmail.com on 12 Jun 2013 at 1:34

Attachments:

GoogleCodeExporter commented 8 years ago
Well if that fixes it, maybe we can pass in the separator char into the 
stylesheet using a xsl param? We can then use kettle's built-in file.separator 
value to passs in the value for that param.

Original comment by roland.bouman on 12 Jun 2013 at 2:14

GoogleCodeExporter commented 8 years ago
i changed the path_separator to be /. the whole issue is running cookbook
on a windows system. all paths need to have /. the patch i sent for issue
58 and 59 fix it but they might not be the more cleaner fix. let me know if
you need more info.

Original comment by tecro...@gmail.com on 12 Jun 2013 at 2:40

GoogleCodeExporter commented 8 years ago
If the separator is changed to /, does it still work on linux and Mac? If so, 
then please commit this change.

Original comment by roland.bouman on 12 Jun 2013 at 5:30

GoogleCodeExporter commented 8 years ago
it's more than just the path separator. i had to change the file pathing in 
create-transform-script.ktr for the file parameter passed in to the 
transformation. I also changed path information in create-index.ktr for both 
the file and folder elements. i don't have access to a mac dev environment. i 
can commit my changes, what do i need to do to get commit access to svn?

Original comment by tecro...@gmail.com on 12 Jun 2013 at 2:14

Attachments:

GoogleCodeExporter commented 8 years ago
"i had to change the file pathing"

what do you mean exactly by this? Does it still work on Linux after this 
change? If that is the case, I'm happy to give you commit access so you can 
push your changes.

Original comment by roland.bouman on 12 Jun 2013 at 3:25

GoogleCodeExporter commented 8 years ago
yes it works on linux, for linux the changes are a noop since \ will never
be in file paths.

I replace ocorrences of \ with / for the following in the index.xml etl

folder_full_name
folder_parent_folder
file_full_name
folder_full_name
folder_parent_folder

and hard coded the separator to /

did the same thing with "param" in the create-transform-script

it may be better to do this in xsl templates but I'm not as familiur with
it, but i do see you have a replace template.

i can push these changes for now and will look at determining an xslt
solution.

thanks.

Original comment by tecro...@gmail.com on 12 Jun 2013 at 3:43

GoogleCodeExporter commented 8 years ago
Hi @tecronin,

sounds like a plan! I just added you to the committers. You should be able to 
check out a read/write version of the svn project, and commit your changes 
there.

Original comment by roland.bouman on 12 Jun 2013 at 4:40

GoogleCodeExporter commented 8 years ago
i've checked in my changes to resolve this

Original comment by tecro...@gmail.com on 12 Jun 2013 at 9:35

GoogleCodeExporter commented 8 years ago
Great work! Thanks again :)

Original comment by roland.bouman on 12 Jun 2013 at 9:51