|
From: bruce <br...@mc...> - 2003-03-28 19:23:23
|
OK, I have implemented this and commited it to the CVS repository. This means that there is now a configuration parameter on the XslTransform pipeline stage that accepts a script "inline". The parameter is called "transformationScript". There is one problem with this. Since the XSL is not based on a URL (file or otherwise) it cannot load relative XML fragments. This is probably not a big issue. regards, Bruce. On Friday 28 March 2003 01:36 pm, bruce wrote: > On Friday 28 March 2003 12:59 pm, ek...@ba... wrote: > > As another alternative, we *could* have an additional column in CONFIG > > named cfg_script of type "text" / long varchar which is nullable. We > > could keep cfg_value as a varchar and add cfg_script which is nullable. > > If cfg_script had a value, then this could be used in place of the > > cfg_value in the internal hashmap. That way, most entries would only > > use cfg_value ... not elegant, but an idea. > > Yes, it will work but it wont solve the immediate problem that we have - > that the XslTransform stage wants to load its data from a file or a url. I > have made a change to this so that the pipeline stage can accept the XSL > script inline OR as a file. > > > ---------------------- Forwarded by Erik Klein/NY/DOMESTIC/BNY on > > 03/28/2003 12:56 PM --------------------------- > > > > > > Erik Klein > > 03/28/2003 12:52 PM > > > > To: "Babeldoc Developers List" <bab...@li...> > > cc: > > Subject: Re: [Babeldoc-devel] Database Tables (Document link: Erik > > Klein) > > > > > > Let me attempt to understand what this implies. > > > > 1. Does this mean that in order for me to do an XSL transformation, I > > will need 2 stages? One for SQLEnrich to read the transformation script > > from the database and another to perform the XslTransform? > > > > 2. Where would I store the XSL Transformation text in the database? Not > > in CONFIG, right? Yet, it would have to be "aligned" with the specific > > Pipeline Name and Pipeline Stage for which it is intended. So, this > > other table would still need to have the same "key", namely CFG_NAME. > > In that case, database normalization rules tell me that they should be > > in the same table, right? Otherwise, I would have two tables with the > > same key. > > > > Tends to lead me toward including it in CONFIG. Our "problem" is based > > on database implementations (varchar vs. text) ... which we should > > really try to abstract ourselves from when writing our Java code. I am > > *very* confident that JDBC 2.0 supports BLOBs and CLOBs (text) just like > > every other SQL data type in that you can issue getBlob(), setBlob() > > just as you would setInt(), getInt() on a prepared statement (i.e. no > > "stupid stuff" like the Oracle BLOB implementation ... which I am sure > > is only JDBC 1.0 dependent). In addition, depending on the database > > implementation, even using getString(), setString() is possible as long > > as the data length of the underlying driver is not exceeded (which can > > be determined by using Statement.getMaxFieldSize()) ... I don't > > recommend this, just thought you might find it interesting. > > > > Here's a link for more info: > > http://java.sun.com/j2se/1.3/docs/guide/jdbc/spec/jdbc-spec.frame7.html#4 > >14 9 > > > > Erik > > > > << > > Does this meet want you need? > > > > On Friday 28 March 2003 09:56 am, bruce wrote: > > > On Friday 28 March 2003 09:49 am, Dejan Krsmanovic wrote: > > > > You could store script as document atribute. There is pipeline stage > > > > called sqlEnrich wich you can use to get data from database using > > > > any sql > > > > > > query and store the result as document attribute. That way you can > > > > use it > > > > > > as inline script in XslTransform witout changing original babeldoc > > > > db > > > > > > schema > > > > > > Yes - thats a great idea. But even so, we will still have to make the > > > change to the XslTransformPipelineStage to load the script inline. I > > > > will > > > > > make this change. > > > > The information in this e-mail, and any attachment therein, is > > confidential and for use by the addressee only. If you are not the > > intended recipient, please return the e-mail to the sender and delete it > > from your computer. Although The Bank of New York attempts to sweep > > e-mail and attachments for viruses, it does not guarantee that either > > are virus-free and accepts no liability for any damage sustained as a > > result of viruses. > > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: > > The Definitive IT and Networking Event. Be There! > > NetWorld+Interop Las Vegas 2003 -- Register today! > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > _______________________________________________ > > Babeldoc-devel mailing list > > Bab...@li... > > https://lists.sourceforge.net/lists/listinfo/babeldoc-devel > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > _______________________________________________ > Babeldoc-devel mailing list > Bab...@li... > https://lists.sourceforge.net/lists/listinfo/babeldoc-devel |