Difference between revisions of "Localizable Views"

From Code4Lib
Jump to: navigation, search
(Specific example: XSLT)
m (Reverted edits by 202.99.29.27 (Talk); changed back to last version by Wickr)
Line 8: Line 8:
 
There are a variety of ways to accomplish this, depending on environment.  
 
There are a variety of ways to accomplish this, depending on environment.  
  
Nice!, and http://www.justin.tv/keeleyhazellpfr/profile keeley hazell pics, and  162365, and http://www.justin.tv/cashloanshm/profile cash loans, and  bfgcl, and http://www.justin.tv/paydayloansonnp/profile payday loans online houston tx, and  690, and http://www.justin.tv/parishiltonsegy/profile paris hilton sex video free, and  8-))), and http://www.justin.tv/guaranteedpaydtd/profile guaranteed payday loan, and  %))), and http://www.justin.tv/eliminatepaydavm/profile eliminate payday loans, and  340167, and http://www.justin.tv/paydayloansuspy/profile payday loans usa fast cash, and  8-]], and http://www.justin.tv/pamelaandersonfb/profile pamela anderson playboy, and  8-]], and http://www.justin.tv/nationwidediscqw/profile nationwide discount home loans, and  gettd, and http://www.justin.tv/fastcashbadcpz/profile fast cash bad credit personal loans, and  603833, and http://www.justin.tv/nofaxsamedayyf/profile no fax same day payday loans, and  117837, and http://www.justin.tv/paydayloanonlsb/profile payday loan online, and 64424, and http://www.justin.tv/britneyspearsmr/profile britney  spears getting fucked, and  ker, and http://www.justin.tv/paydayloanutaqz/profile payday loan utah, and  =-(, and
+
== Specific example: XSLT ==
 +
 
 +
If your views are in [[XSLT]], the XSLT 'import' function provides a convenient method to allow over-riding of XSLT for localization.  
 +
 
 +
Put your XSLT that is distributed with the application in one directory or directory tree.  
 +
 
 +
Have another separate directory tree for local XSLT "overrides".  
 +
 
 +
When your application loads an XSLT file, it can first check to see if an XSLT file with the same name/pat exists in the 'local' directory. If so, it can combine the 'distribution' and the 'local' version of that XSLT file can be combined together using XSLT 'import' statement, so that any templates or variables in the 'local' version will override the distribution version.  
 +
 
 +
Application Example: Xerxes

Revision as of 18:08, 28 April 2009


There needs to be a way for local implementers to customize the 'templates' or 'views' to have, at a minimum, their own branding, without actually editing shared distribution code. Ideally, they should be able to customize as much as possible of the templates/views.

Localized templates/views should probably live in different directories than distributed templates/views, for ease of local source control.

There are a variety of ways to accomplish this, depending on environment.

Specific example: XSLT

If your views are in XSLT, the XSLT 'import' function provides a convenient method to allow over-riding of XSLT for localization.

Put your XSLT that is distributed with the application in one directory or directory tree.

Have another separate directory tree for local XSLT "overrides".

When your application loads an XSLT file, it can first check to see if an XSLT file with the same name/pat exists in the 'local' directory. If so, it can combine the 'distribution' and the 'local' version of that XSLT file can be combined together using XSLT 'import' statement, so that any templates or variables in the 'local' version will override the distribution version.

Application Example: Xerxes