Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Many Dbs - one set of stylesheets


This topic is 7183 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Is it possible to have many databases using one set of xsl stylesheets? I just got our CWP solution up and I can't get my mind around this one...

Currently I am specifying the db as a parameter in the xslt-cwp-query tag, but I'd like to reuse the stylesheets for different dbs in the same site.

i.e.,

DB1 uses /xslt-template-files/searchDBs.xsl and /xslt-template-files/listDBs.xsl

DB2 also uses xsl sheets above

or is it better to:

DB1 uses /xslt-template-files/db1/searchDB1.xsl and /xslt-template-files/db1/listDB1.xsl

DB2 uses /xslt-template-files/db2/searchDB2.xsl and /xslt-template-files/db2/listDB2.xsl

TIA,

Tony

Posted

Instead of using SerchDB1.xsl use this

& it; datasource database= "DBNAME"/>

& it; tmetadata>

IF you have more DB's to list just ad in multipule datasources i.e.

& it; datasource database= "DB1"/>

& it; datasource database= "DB2"/>

& it; datasource database= "DB3"/>

& it; metadata>

(using & it; Instead of < for Forum viewing.

Or check out "USING FIleMaker 7" by Lane, Bowers, Love, & Moyer

Joe T.

Posted

Hmm. I can imagine that this might work on exported XML data. But can you explain how this would work with XML data that is produced on the fly with custom web publishing and sent directly to the XSLT engine?

Posted

Two different ideas:

- use a library of small reusable templates with <xsl:include href="lib/somelib.xsl"> and xsl:call-template

- in Apache, define aliases in your website settings that redirect from a certain regexp pattern, e.g. /db-name to the final query /fmi/xsl/somestylesheet.xsl?-db=db-name&... . You can define that in the Max OS X Server Admin tool.

Martin

BTW: We made the PhD in the same year.

Posted

Two different ideas:

- use a library of small reusable templates with and xsl:call-template

That is what I probably will have to do. Each DB will have its own sub-folder in "xsl-templates." Then I will need to edit each set of stylesheets to be specific for the DB.

Actually, this is what I wanted to avoid. Have you had any experience using Tokens, cookies, or fmxslt:get_session_object ?

- in Apache, define aliases in your website settings that redirect from a certain regexp pattern, e.g. /db-name to the final query /fmi/xsl/somestylesheet.xsl?-db=db-name&... . You can define that in the Max OS X Server Admin tool.

Interesting, I'll have to look into that - I'm not an Apache expert, so it might be out of my skill set. :-)

BTW: We made the PhD in the same year.

Cool! I hope you are using yours better than I am ! :-) FM Dev ? Plant Biochemistry :-)

Posted

tokens: I use them quite often. Good for string passing. Without difficulty.

cookies: only in one case, for using in sort of a private/public key encryption

session extension functions: tested once, but don't see an application for the moment. But you could store whole XML result set trees server-side. Essentially I see some problems there in defining a reasonable session name for each session, not the handling of the session extension functions themselves.

Apropos PhD: Not on Gibberellins and Ca2+-channels smirk.gif but on quantum chemistry on inorganic solids, especially silver clusters in zeolite channels ... There's still some chemistry involved in my present work, although FM takes some time at present.

This topic is 7183 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.