From chris at webarchitects.co.uk Sat May 10 10:35:43 2003 From: chris at webarchitects.co.uk (Chris Croome) Date: Sat May 10 09:35:45 2003 Subject: [Petal] Re: [xml-dev] XInclude Support In-Reply-To: <20030509184827.Q1906@redhat.com> References: <5.2.0.9.0.20030509074459.06111b30@mail.verizon.net> <20030509221807.GB24538@webarchitects.co.uk> <20030509184827.Q1906@redhat.com> Message-ID: <20030510083543.GA27195@webarchitects.co.uk> Hi On Fri 09-May-2003 at 06:48:27PM -0400, Daniel Veillard wrote: > > Hum, XInclude spec requires recursion so I don't understand that > limitation statement, You mean this? Also note that contrarily to the XInclude specification Petal DOES allow recursive includes up to $Petal::MAX_INCLUDES. This behavior is very useful when templating structures which fit well recursive processing such as trees, nested lists, etc. http://search.cpan.org/author/JHIVER/Petal-0.92/lib/Petal.pm#limitations My understand is that is doesn't comply with this: http://www.w3.org/TR/xinclude/#loops Because it allows, for example, a fragment of XML, say a bit of a template for a sitemap to have a XInclude pointing to itself. If the following is in a file called nesting.html and it includes itself then I understand that this is not OK according to the spec.
  • Child Document Title
  • I have copied this to the Petal list, which I think is open, so it is fine to keep the CC if there are any replies to this. Chris -- Chris Croome web design http://www.webarchitects.co.uk/ web content management http://mkdoc.com/ From jhiver at mkdoc.com Mon May 19 14:36:04 2003 From: jhiver at mkdoc.com (Jean-Michel Hiver) Date: Mon May 19 13:36:27 2003 Subject: [Petal] Re: Petal: proposed patch In-Reply-To: <3EC8B435.5060700@mclean.net.nz> References: <3EC8B435.5060700@mclean.net.nz> Message-ID: <20030519123604.GA6085@mkdoc.com> > Hi Jean-Michel > > Thanks for writing Petal. I read an article on Zope's TAL and > thought the concept was pretty cool. You're welcome... TAL is way too cool, someone had to do it :) > I am adding support for Petal templates into one of my projects, but > have hit a snag with the way Petal options work. My project runs > under mod_perl and has a number of modules, each mapped to a different > directory. Each module requires a different value for BASE_DIR and > it's quite possible that each module might need different values for > INPUT, OUTPUT and possibly other options too. I know I can use > local() to isolate the effect of changing globals but that doesn't > really fit well with my existing design (the options are set in a > different routine to the one that processes the template). I see... > I'm happy to put together a patch to 'fix' Petal, but I thought I'd > check first whether you approved of the approach and whether you'd > accept a patch. > > My thinking is that the existing globals would remain and be used as > default values but the documentation would note that changing the > globals is a deprecated API. The new way to set options would be to > pass them to the constructor like this: > > my $template = Petal->new( file => 'products.html', base_dir => > '/var/www/petshop', input => 'HTML', output => 'HTML', taint > => 1) I can see a problem with includes. The way Petal handles includes is by creating a new Petal object on the included file. Look at the _include subroutine in Petal/lib/Petal/CodeGenerator.pm Basically I don't think it's impossible to do, but there might be a few catches here and there. > These option values would be stored directly in the object hashref at > the time the object was constructed. Later, when an option value was > required, the code would do this: > > $self->{base_dir} > > Instead of this: > > $Petal::BASE_DIR I think it would be even better if you had a method rather than accessing values directly... Anyway feel free to hack Petal so that it matches your needs, as long as it doesn't break backwards compatibility and passes the test suite there is a strong chance that I'll apply it or at least make it an option :) > I hope you'll agree that the change is not too elaborate. If you're > happy with the proposal as I've outlined it, let me know and I'll put > togther a patch. I've CC'ed this message on the Petal mailing list just to know what everybody else thinks. Thanks for your interest in Petal, -- Building a better web - http://www.mkdoc.com/ --------------------------------------------- Jean-Michel Hiver jhiver@mkdoc.com - +44 (0)114 255 8097 Homepage: http://www.webmatrix.net/ From william at knowmad.com Mon May 19 09:53:33 2003 From: william at knowmad.com (William McKee) Date: Mon May 19 13:51:40 2003 Subject: [Petal] Re: Petal: proposed patch In-Reply-To: <20030519123604.GA6085@mkdoc.com> References: <3EC8B435.5060700@mclean.net.nz> <20030519123604.GA6085@mkdoc.com> Message-ID: <20030519125333.GL1004@knowmad.com> On Mon, May 19, 2003 at 01:36:04PM +0100, Jean-Michel Hiver wrote: > I've CC'ed this message on the Petal mailing list just to know what > everybody else thinks. Hi Grant, I think this is a good idea. As I recall, Petal used to take it's settings from the constructor way back when it was 0.10 or so. I was a bit surprised when Jean-Michel introduced the global settings but fortunately haven't run across a problem with it yet. However, I can see the benefit of having these values be set on a per-instance basis. Good luck, William -- Knowmad Services Inc. http://www.knowmad.com From jhiver at mkdoc.com Mon May 19 14:51:58 2003 From: jhiver at mkdoc.com (Jean-Michel Hiver) Date: Mon May 19 13:52:03 2003 Subject: [Petal] strange behaviour In-Reply-To: <200304282139.04211.fergal@esatclear.ie> References: <200304282139.04211.fergal@esatclear.ie> Message-ID: <20030519125158.GB6085@mkdoc.com> Hi, > > a = *** > > a = > > > > doesn't seem to work correctly. The define doesn't seem to have any effect. If > you remove the line with *** it works fine. Any ideas? The generated code > looks fine, Nicely spotted! Will be fixed soon :) Cheers, -- Building a better web - http://www.mkdoc.com/ --------------------------------------------- Jean-Michel Hiver jhiver@mkdoc.com - +44 (0)114 255 8097 Homepage: http://www.webmatrix.net/ From jhiver at mkdoc.com Mon May 19 14:56:49 2003 From: jhiver at mkdoc.com (Jean-Michel Hiver) Date: Mon May 19 13:56:54 2003 Subject: [Petal] Re: Handling/rethrowing errors in Petal In-Reply-To: <3EAC6B5C.5040708@thinkfoo.com> References: <3EAC6B5C.5040708@thinkfoo.com> Message-ID: <20030519125649.GC6085@mkdoc.com> > Hi Jean-Michel, Hi Mark, > I have finally had some time to work on my petal-involving projects. Good! > Whilst converting one site over to petal I have come across a problem > with my mason/petal set up that required me to hack out my own version. > The problem is, as I chain mason components and petal objects together > my mason-generated errors are not being propagated up the chain. Instead > they are getting stringyfied by petal, meaning that what mason would > usually treat only as a warning, is being treated as a fatal error. > > Quite simply, I need to be able to subclass petal and substitute in my > own error handling at the end of the proccess routine. > > E.g. where petal currently does this: > > line 235: > eval { $res = $coderef->($hash) }; > if (defined $@ and $@) { confess $@ . "\n===\n\n" . > $self->_code_with_line_numbers } > return $res; > > it could call its own 'handle_error' method: > > eval { $res = $coderef->($hash) }; > $self->handle_error($@); > > and in the subclass i would then be able say: > > sub handle_error { > my $self = shift; > my $err = shift; > > if (defined $err and $err) { > if (isa_mason_exception($err)) { > die $err; > } else { > confess $@ . "\n===\n\n" . $self->_code_with_line_numbers; > } > } > } > > (isa_mason_exception is a imported routine which simply checks that $err > belongs to the html::mason::exception class) > > Just a suggestion, perhaps there's a better way? This looks good to me. I'll do that bit of refactoring and make a release soon so that you can handle Mason errors correctly. > Hope you're enjoying/enjoyed your holiday. I just came back yesterday. It was brilliant! French polynesia is well worth visiting, especially if like me you like scuba diving :). Cheers, -- Building a better web - http://www.mkdoc.com/ --------------------------------------------- Jean-Michel Hiver hiver@mkdoc.com - +44 (0)114 255 8097 Homepage: http://www.webmatrix.net/ From fergal at esatclear.ie Mon May 19 16:03:46 2003 From: fergal at esatclear.ie (Fergal Daly) Date: Mon May 19 15:17:54 2003 Subject: [Petal] strange behaviour In-Reply-To: <20030519125158.GB6085@mkdoc.com> References: <200304282139.04211.fergal@esatclear.ie> <20030519125158.GB6085@mkdoc.com> Message-ID: <200305191503.46937.fergal@esatclear.ie> On Monday 19 May 2003 13:51, Jean-Michel Hiver wrote: > > doesn't seem to work correctly. The define doesn't seem to have any effect. If > > you remove the line with *** it works fine. Any ideas? The generated code > > looks fine, > > Nicely spotted! Will be fixed soon :) > Cheers, Welcome back. While you're fixing that, here's a related problem that probably needs fixing. I discovered the problem above while trying to test this I guess that this will produce but the first problem got in my way. It's unlikely you'd ever do the above deliberately but it's quite possible that in some situations, the value used for the omit-tag test could have changed by the time you test it again at the end. Really it should only be tested once. This would probably require another PIS tag specifically for omit-tags and a corresponding end tag, producing code somthing like { my $omit_test = $hash->get("thing"); if (not $omit_test) { print "<$tag_name>"; } # code for the template inside the tag goes here if (not $omit_test) { print ""; } } F From mark at thinkfoo.com Tue May 20 00:55:45 2003 From: mark at thinkfoo.com (Mark Holland) Date: Mon May 19 22:56:35 2003 Subject: [Petal] Re: Petal: proposed patch In-Reply-To: <20030519123604.GA6085@mkdoc.com> References: <3EC8B435.5060700@mclean.net.nz> <20030519123604.GA6085@mkdoc.com> Message-ID: <3EC952E1.1070909@thinkfoo.com> Jean-Michel Hiver wrote: >I've CC'ed this message on the Petal mailing list just to know what >everybody else thinks. > > I can see the advantage of being able to pass these parameters to the constructor. My Petal/Mason setup currently has the @BASE_DIR set to the Mason component root, and I calculate the path to the template each time I process a template. However, using this method I could calculate the base_dir for each component indivdually. Also, I could imagine a situation in the future where I may need to change the input/output type for a specific template. Being able to pass these params to the constructor rather than temporarily changing the global INPUT/OUTPUT variables would be preferable for me. Cheers, Mark From spurkis at quiup.com Tue May 20 18:01:11 2003 From: spurkis at quiup.com (Steve Purkis) Date: Tue May 20 17:01:15 2003 Subject: [Petal] Some Limitations of Petal Message-ID: <46FB8724-8ADC-11D7-AB43-003065968BC2@quiup.com> Hi all, I've been working with Petal quite a bit recently. While it does its job well most of the time, I've still come across some limitations I thought I should report. Some of these are high-level issues I wasn't sure if I should report via rt.cpan.org, so I've decided to post them here: 1. Error message are frequently cryptic Unless you're a coder, a stack-trace is not going to help you fix errors in your templates. As users of WYSIWYG editors are target users of Petal (as documented), I see this as a grave functional bug. Severity: high 2. You can't pass values back to the template processor. I realize this is a documented limitation, but not being able to say things like: means the implementer has to jump through hoops to accomplish some basic tasks. Severity: high, IMHO 3. You can't use hash keys with '.' separators, ie: ... Severity: low 4. Semi-colons sometimes break 'ugly format' if statements. This fails: ... This does not: ... Severity: low Hope this helps, -Steve From spurkis at quiup.com Tue May 20 18:04:18 2003 From: spurkis at quiup.com (Steve Purkis) Date: Tue May 20 17:04:24 2003 Subject: [Petal] TT3 & Petal (was: Template Toolkit puzzlement) Message-ID: Hi all, After seeing the message below posted on London.pm a while ago, I began to wonder if Petal could become a flavour of the Template::Toolkit? This would bring about all the advantages of the TAL language, along with the features of TT. As TT3 is in the makings, I thought now would be a good time to investigate. I have images of Perl template writers joining forces to create a standard API while preserving the features of each template system... Bundle-Template perhaps? :) -Steve Begin forwarded message: > From: Andy Wardley > Date: Tue Apr 29, 2003 11:50:14 am Europe/London > To: london.pm@london.pm.org > Subject: Re: Template Toolkit puzzlement > Reply-To: london.pm@london.pm.org > > [snip!] > > One of the things I'm trying to acheive with TT3 is to make a clearer > separation between common, reusable modules that are generic to > template > processing, and modules that are specific to the TT mini-language(s). > > I'm hoping that this will make it easier to reuse parts of TT without > having to incorporate the whole framework. So, for example, if you > wanted > to write your own template processor, but re-use the TT provider > mechanism, > then you could do so and take advantage of various different TT > providers > available (e.g. filesystem, database) but without having to use the > whole of TT. Or you might choose to re-use the service framework, > parts > of the parser, the filter or plugin mechanisms, but without the > overhead > of the whole caboodle. > > Thus TT will become more of a toolkit for writing template processors > and > TT2 and TT3 will be particular mini-language dialects written using the > Template Toolkit. > > Well, that's the plan anyway. > > A > From spurkis at quiup.com Thu May 22 15:44:58 2003 From: spurkis at quiup.com (Steve Purkis) Date: Thu May 22 14:48:37 2003 Subject: [Petal] [BUG] can't set variables to static values Message-ID: <941EF6F6-8C5B-11D7-864F-003065968BC2@quiup.com> Hi, This is a bug report for Petal-0.92. I haven't been able to find a way to set variables to static values (without writing any plugins). If I'm just being thick, please let me know :-). Here are some test cases: ok 1not ok 1 ok 2not ok 2 ok 3not ok 3 The docs on 'define' lead me to believe I should be able to do the above (ie: isn't '1' just an expression?) Regards, -Steve From jhiver at mkdoc.com Thu May 22 15:58:13 2003 From: jhiver at mkdoc.com (Jean-Michel Hiver) Date: Thu May 22 14:58:21 2003 Subject: [Petal] [BUG] can't set variables to static values In-Reply-To: <941EF6F6-8C5B-11D7-864F-003065968BC2@quiup.com> References: <941EF6F6-8C5B-11D7-864F-003065968BC2@quiup.com> Message-ID: <20030522135813.GA32463@mkdoc.com> > The docs on 'define' lead me to believe I should be able to do the > above (ie: isn't '1' just an expression?) Yes, '1' is an expression that designates the variable named '1'. The litteral '1' would be 'string:1'. Cheers, -- Building a better web - http://www.mkdoc.com/ --------------------------------------------- Jean-Michel Hiver jhiver@mkdoc.com - +44 (0)114 255 8097 Homepage: http://www.webmatrix.net/ From spurkis at quiup.com Thu May 22 16:12:24 2003 From: spurkis at quiup.com (Steve Purkis) Date: Thu May 22 15:16:25 2003 Subject: [Petal] [BUG] can't set variables to static values In-Reply-To: <20030522135813.GA32463@mkdoc.com> Message-ID: <691864DF-8C5F-11D7-864F-003065968BC2@quiup.com> On Thursday, May 22, 2003, at 02:58 pm, Jean-Michel Hiver wrote: >> The docs on 'define' lead me to believe I should be able to do the >> above (ie: isn't '1' just an expression?) > > Yes, '1' is an expression that designates the variable named '1'. > The litteral '1' would be 'string:1'. Good - so I was just being stupid :) But now I've run into another problem... this produces an error: lang-fu: $lang/fu It lets me set lang/fu fine (ie: if I take out the last line, it works). And I've tried variations on the theme to no avail. Any ideas? Regards, -Steve From spurkis at quiup.com Thu May 22 16:14:22 2003 From: spurkis at quiup.com (Steve Purkis) Date: Thu May 22 15:17:40 2003 Subject: [Petal] [BUG] xi:includes don't preserve set variables Message-ID: Hi, This is a bug report for Petal-0.92. It looks like variables from xi:includes are not being preserved across files. This makes factoring out common chunks of functionality very difficult. Here's a test scenario: index.html: foo (index.html): $foo foo.html: foo (foo.html): $foo Regards, -Steve From jhiver at mkdoc.com Thu May 22 16:26:07 2003 From: jhiver at mkdoc.com (Jean-Michel Hiver) Date: Thu May 22 15:26:13 2003 Subject: [Petal] [BUG] can't set variables to static values In-Reply-To: <691864DF-8C5F-11D7-864F-003065968BC2@quiup.com> References: <20030522135813.GA32463@mkdoc.com> <691864DF-8C5F-11D7-864F-003065968BC2@quiup.com> Message-ID: <20030522142607.GB32463@mkdoc.com> > > > > > lang-fu: $lang/fu > > It lets me set lang/fu fine (ie: if I take out the last line, it > works). And I've tried variations on the theme to no avail. Any ideas? I see... Basically you're internally creating a 'lang/fu' hash key, but then you can't access this value using $lang/fu because Petal is trying to access $hash->{lang}->fu() or $hash->{lang}->{fu}... Have you tried using $lang\/fu when retrieving the variable? Cheers, -- Building a better web - http://www.mkdoc.com/ --------------------------------------------- Jean-Michel Hiver jhiver@mkdoc.com - +44 (0)114 255 8097 Homepage: http://www.webmatrix.net/ From jhiver at mkdoc.com Thu May 22 16:31:50 2003 From: jhiver at mkdoc.com (Jean-Michel Hiver) Date: Thu May 22 15:31:57 2003 Subject: [Petal] [BUG] xi:includes don't preserve set variables In-Reply-To: References: Message-ID: <20030522143150.GC32463@mkdoc.com> > Hi, > > This is a bug report for Petal-0.92. It looks like variables from > xi:includes are not being preserved across files. This has been discussed on the list before. Basically there is a need for a 'local' and a 'global' keyword to specify the scope of a variable. This is what TALES does, unfortunately it's not yet implemented in Petal. Another item on my TODO list... > This makes factoring out common chunks of functionality very > difficult. Functionality? Did you say functionality? You're not using Petal for anything else than presentational stuff I hope :) Best Regards, -- Building a better web - http://www.mkdoc.com/ --------------------------------------------- Jean-Michel Hiver jhiver@mkdoc.com - +44 (0)114 255 8097 Homepage: http://www.webmatrix.net/ From spurkis at quiup.com Thu May 22 16:56:34 2003 From: spurkis at quiup.com (Steve Purkis) Date: Thu May 22 17:19:37 2003 Subject: [Petal] [BUG] can't set variables to static values In-Reply-To: <20030522142607.GB32463@mkdoc.com> Message-ID: <94A17F6E-8C65-11D7-864F-003065968BC2@quiup.com> On Thursday, May 22, 2003, at 03:26 pm, Jean-Michel Hiver wrote: >> >> >> >> >> lang-fu: $lang/fu >> >> It lets me set lang/fu fine (ie: if I take out the last line, it >> works). And I've tried variations on the theme to no avail. Any >> ideas? > > I see... Basically you're internally creating a 'lang/fu' hash key, but > then you can't access this value using $lang/fu because Petal is trying > to access $hash->{lang}->fu() or $hash->{lang}->{fu}... Yup - auto-vivifying a hash was what I was hoping it would do... > Have you tried using $lang\/fu when retrieving the variable? No, and I wouldn't want to in this situation - this is part of a larger problem I'm trying to solve, which warrants some explanation: The idea is that 'lang' can be set from a number of different places such as $session/language, $view/language, $user/preferred_language, etc. In the case that 'lang' is not set, I'd like to still be able to use it as if it were. (ie: access $lang/name without Petal throwing an error). These are the possible solutions I've thought of: 1. Use single values for lang attributes (ie: $lang_name vs $lang/name) 2. Create a 'fake' value for lang in the template. 3. Change Petal so that it returns false instead of throwing an error. 4. Move this logic into the back-end. I'm doing (1) at the moment, and was investigating (2). (3) has occurred to me in the past, but seems like it might be too much work. And I'd rather not do (4) because this is a presentation issue and should be handled in the presentation layer. -Steve From spurkis at quiup.com Thu May 22 17:03:14 2003 From: spurkis at quiup.com (Steve Purkis) Date: Thu May 22 23:24:33 2003 Subject: [Petal] [BUG] xi:includes don't preserve set variables In-Reply-To: <20030522143150.GC32463@mkdoc.com> Message-ID: <835393DF-8C66-11D7-864F-003065968BC2@quiup.com> On Thursday, May 22, 2003, at 03:31 pm, Jean-Michel Hiver wrote: >> Hi, >> >> This is a bug report for Petal-0.92. It looks like variables from >> xi:includes are not being preserved across files. > > This has been discussed on the list before. Basically there is a need > for a 'local' and a 'global' keyword to specify the scope of a > variable. > This is what TALES does, unfortunately it's not yet implemented in > Petal. Another item on my TODO list... Now that you mention it, I've fuzzy recollections of something similar in the archives... >> This makes factoring out common chunks of functionality very >> difficult. > > Functionality? Did you say functionality? You're not using Petal for > anything else than presentational stuff I hope :) Why, no, of course not! :) (but you need some functions to do some presentations don't you? :) -Steve From fergal at esatclear.ie Fri May 23 01:40:16 2003 From: fergal at esatclear.ie (Fergal Daly) Date: Fri May 23 00:34:08 2003 Subject: [Petal] [BUG] can't set variables to static values In-Reply-To: <94A17F6E-8C65-11D7-864F-003065968BC2@quiup.com> References: <94A17F6E-8C65-11D7-864F-003065968BC2@quiup.com> Message-ID: <200305230040.17054.fergal@esatclear.ie> On Thursday 22 May 2003 15:56, Steve Purkis wrote: > Yup - auto-vivifying a hash was what I was hoping it would do... As far as I know, Petal (and TAL) only set variables at the top level. So trying to set $lang/fu is not supposed to work. I think this makes sense as it discourages peple from building too much complexity into their templates. They're pretty much designed to be used as shortcuts so you don't have to keep typing $big/long/variable/path/expression. > These are the possible solutions I've thought of: > 1. Use single values for lang attributes (ie: $lang_name vs $lang/name) > 2. Create a 'fake' value for lang in the template. > 3. Change Petal so that it returns false instead of throwing an error. > 4. Move this logic into the back-end. > > I'm doing (1) at the moment, and was investigating (2). (3) has > occurred to me in the past, but seems like it might be too much work. > And I'd rather not do (4) because this is a presentation issue and > should be handled in the presentation layer. I think (4) is actually the correct option. Even if language was a presentation issue, setting all the variables is not presentation and also it's messy enough that you don't want to have to think about it and in your template code. That said, I don't think language is a presentation issue, at least not in the same way style and layout are. If you are making something multi-language you really have three layers a: backend logic b: localisation c: presentation a: decides what you want to say and produces data, b: checks that data for anything that needs to be localised to the desired language and c: then takes the localised strings and data and presents them in the correct layout and style. In reality a and b are usually merged together because it's usually easier to localise strings when they are generated than go hunting for them afterwards. Separating all 3 layers would only be useful if you wanted to present the same data in several different languages but just generate it once, F From jhiver at mkdoc.com Fri May 23 10:45:35 2003 From: jhiver at mkdoc.com (Jean-Michel Hiver) Date: Fri May 23 09:45:41 2003 Subject: [Petal] [BUG] can't set variables to static values In-Reply-To: <94A17F6E-8C65-11D7-864F-003065968BC2@quiup.com> References: <20030522142607.GB32463@mkdoc.com> <94A17F6E-8C65-11D7-864F-003065968BC2@quiup.com> Message-ID: <20030523084535.GA5910@mkdoc.com> On Thu 22-May-2003 at 03:56:34PM +0100, Steve Purkis wrote: > On Thursday, May 22, 2003, at 03:26 pm, Jean-Michel Hiver wrote: > > >> > >> > >> > >> > >> lang-fu: $lang/fu > >> > >>It lets me set lang/fu fine (ie: if I take out the last line, it > >>works). And I've tried variations on the theme to no avail. Any > >>ideas? > > > >I see... Basically you're internally creating a 'lang/fu' hash key, but > >then you can't access this value using $lang/fu because Petal is trying > >to access $hash->{lang}->fu() or $hash->{lang}->{fu}... > > Yup - auto-vivifying a hash was what I was hoping it would do... You might want to take a look into Petal/Hash.pm and change the way the 'set:' modifier works... From there you can either write your own set: modifier or submit a patch on the list :) Cheers, -- Building a better web - http://www.mkdoc.com/ --------------------------------------------- Jean-Michel Hiver jhiver@mkdoc.com - +44 (0)114 255 8097 Homepage: http://www.webmatrix.net/ From spurkis at quiup.com Fri May 23 12:24:21 2003 From: spurkis at quiup.com (Steve Purkis) Date: Fri May 23 11:24:25 2003 Subject: [Petal] [BUG] can't set variables to static values In-Reply-To: <200305230040.17054.fergal@esatclear.ie> Message-ID: Hi Fergal, On Friday, May 23, 2003, at 12:40 am, Fergal Daly wrote: > On Thursday 22 May 2003 15:56, Steve Purkis wrote: >> Yup - auto-vivifying a hash was what I was hoping it would do... > > As far as I know, Petal (and TAL) only set variables at the top level. > So > trying to set $lang/fu is not supposed to work. I think this makes > sense as > it discourages peple from building too much complexity into their > templates. > They're pretty much designed to be used as shortcuts so you don't have > to > keep typing $big/long/variable/path/expression. Yeah - too much complexity in templates is definitely not a good thing. And I admit that trying to set $lang/fu in this case is a bit of a hack... But in general, I don't see why auto-vivifying a hash is a bad thing - it's a handy way of grouping things for the template writer. But maybe this depends on what you consider to be a presentation issue... Say for some reason you didn't know how many columns would be in a table until runtime. I'd like to be able to do something like: $table/cols = foo/number_of_attributes $table/col1/width = 100 / $table/cols ... Ok, so it's not the best example in the world :) but IMHO, this is a presentation issue, and should be handled in the template. >> These are the possible solutions I've thought of: >> 1. Use single values for lang attributes (ie: $lang_name vs >> $lang/name) >> 2. Create a 'fake' value for lang in the template. >> 3. Change Petal so that it returns false instead of throwing an error. >> 4. Move this logic into the back-end. >> >> I'm doing (1) at the moment, and was investigating (2). (3) has >> occurred to me in the past, but seems like it might be too much work. >> And I'd rather not do (4) because this is a presentation issue and >> should be handled in the presentation layer. > > I think (4) is actually the correct option. Even if language was a > presentation issue, setting all the variables is not presentation and > also > it's messy enough that you don't want to have to think about it and in > your > template code. > > That said, I don't think language is a presentation issue, at least > not in the > same way style and layout are. In the above example, use of 'lang' _is_ a presentation issue - but in all fairness, I think I may have chosen a misleading example :). Languages are just one type of business object that a user can edit. Perhaps 'car' would have been a better example than 'lang'. After sleeping on it, I think (3) is actually the best option. It also fits in line with other templating systems I've used - if a value for the variable cannot be found, return undef, false, or something along those lines. But for backwards compatibility, I think a switch in Petal would do the trick ($Petal::ERROR_ON_UNDEF_VAR ?). > If you are making something multi-language you > really have three layers > > a: backend logic > b: localisation > c: presentation > > a: decides what you want to say and produces data, b: checks that data > for > anything that needs to be localised to the desired language and c: > then takes > the localised strings and data and presents them in the correct layout > and > style. In reality a and b are usually merged together because it's > usually > easier to localise strings when they are generated than go hunting for > them > afterwards. Separating all 3 layers would only be useful if you wanted > to > present the same data in several different languages but just generate > it > once, I'm actually trying to do all of my localization in the presentation layer. At the moment, I'm using flags for messages that need to be localized (such as 'user removed', 'user modified', 'user name invalid', etc.). I realize this is a simplistic approach which won't work with complicated messages, but I'm hoping that if I tread carefully I'll be able to avoid generating complicated messages and use this across the board. *fingers crossed* :) If things get hairy, I plan to bite the bullet and fall back to Locale::Gettext or Locale::Maketext. Thanks for writing, -Steve From spurkis at quiup.com Fri May 23 12:28:10 2003 From: spurkis at quiup.com (Steve Purkis) Date: Fri May 23 11:29:08 2003 Subject: [Petal] [BUG] can't set variables to static values In-Reply-To: <20030523084535.GA5910@mkdoc.com> Message-ID: <40156CE6-8D09-11D7-864F-003065968BC2@quiup.com> On Friday, May 23, 2003, at 09:45 am, Jean-Michel Hiver wrote: >> >> Yup - auto-vivifying a hash was what I was hoping it would do... > > You might want to take a look into Petal/Hash.pm and change the way the > 'set:' modifier works... From there you can either write your own set: > modifier or submit a patch on the list :) Yeah, if I get the time I might do just that :) -Steve From fergal at esatclear.ie Mon May 26 03:22:07 2003 From: fergal at esatclear.ie (Fergal Daly) Date: Mon May 26 02:15:50 2003 Subject: [Petal] [BUG] can't set variables to static values Message-ID: <200305260222.07774.fergal@esatclear.ie> On Friday 23 May 2003 11:24, Steve Purkis wrote: > Yeah - too much complexity in templates is definitely not a good thing. > And I admit that trying to set $lang/fu in this case is a bit of a > hack... But in general, I don't see why auto-vivifying a hash is a bad > thing - it's a handy way of grouping things for the template writer. TAL does't have hashes, so that's why it can't autovivify them. You cannot set "a/b". From the TAL spec argument ::= define_scope [';' define_scope]* define_scope ::= (['local'] | 'global') define_var define_var ::= variable_name expression variable_name ::= Name variable_name is not a path expression, it is simply a name, there can be no "/"s in it. It really depends on what you're looking for from your templating language. I get the impression that TAL is very deliberatley designed to prevent you doing anything complicated in the template. That suits me perfectly. Before TAL I was using a homegrown system that had variable and loops and that's all, everything else had to worked out by the app. I was working with HTML coders, some of whom produced lovely looking web page but had quite a bit of trouble even with loops and variable substitutions. So I have no desire to put any logic at all in my templates. > But maybe this depends on what you consider to be a presentation > issue... Say for some reason you didn't know how many columns would be > in a table until runtime. I'd like to be able to do something like: > > $table/cols = foo/number_of_attributes > $table/col1/width = 100 / $table/cols > ... > > Ok, so it's not the best example in the world :) but IMHO, this is a > presentation issue, and should be handled in the template. Even though you don't like the example, I think it is illustrative. Your ... hides a lot. It hides the fact that you would actually need a for loop here because you don't know how many columns you will need to initialise. So now you have a for loop in your template that doesn't produce any output, you're using TAL as a programming language but TAL makes a pretty poor programming language as you can see
    apart from being horribly verbose and cumbersome, there's lots more functionality missing from TAL the programming language, so rather than turning TAL into a very bad programming language you should do all your calculating in functions ...
    that way you can use it in all your other templates too. I know your example was a bad one but I don't think there is an example where it isn't easier to just put it in a function and you'll be glad of it if you ever have to let someone non-technical near your templates. Just because something is a presentation issue doesn't mean the code for it has to be in the template. Zope comes with a package of utility functions for table layout and other common things and I got the impression that TAL is the way it is because it's predecessor (DTML) allowed people to do too much programming in the templates and caused a lot headaches, F From spurkis at mkdoc.com Wed May 28 12:47:04 2003 From: spurkis at mkdoc.com (Steve Purkis) Date: Wed May 28 11:47:09 2003 Subject: [Petal] [BUG] can't set variables to static values In-Reply-To: <200305260222.07774.fergal@esatclear.ie> Message-ID: On Monday, May 26, 2003, at 02:22 am, Fergal Daly wrote: > On Friday 23 May 2003 11:24, Steve Purkis wrote: >> Yeah - too much complexity in templates is definitely not a good >> thing. >> And I admit that trying to set $lang/fu in this case is a bit of a >> hack... But in general, I don't see why auto-vivifying a hash is a >> bad >> thing - it's a handy way of grouping things for the template writer. > > TAL does't have hashes, so that's why it can't autovivify them. You > cannot set > "a/b". From the TAL spec > > [snip] Ahh, a shame that. It's not very intuitive from a Perly point of view. And I'm assuming Petal aims to be 100% TAL compliant? I'd be inclined to implement it anyway, but if no-one else would use it then it's not really worth it. So perhaps Petal::Hash should be modified to throw an error if you attempt the above? At least that would save anyone else from falling into the same trap... > It really depends on what you're looking for from your templating > language. I > get the impression that TAL is very deliberatley designed to prevent > you > doing anything complicated in the template. That suits me perfectly. > Before > TAL I was using a homegrown system that had variable and loops and > that's > all, everything else had to worked out by the app. I was working with > HTML > coders, some of whom produced lovely looking web page but had quite a > bit of > trouble even with loops and variable substitutions. So I have no > desire to > put any logic at all in my templates. Yeah, I've also worked with HTML people who don't know the first thing about coding. The way I see it you can either train them up to use various template systems if they are so inclined, or you can take the HTML and cut it up into templates yourself. I prefer to work with people who can do the former. And I don't see anything wrong with doing complicated things in templates so long as both they and their purpose are obvious, but I think it really does boil down to preference. >> But maybe this depends on what you consider to be a presentation >> issue... Say for some reason you didn't know how many columns would >> be >> in a table until runtime. I'd like to be able to do something like: >> >> $table/cols = foo/number_of_attributes >> $table/col1/width = 100 / $table/cols >> ... >> >> Ok, so it's not the best example in the world :) but IMHO, this is a >> presentation issue, and should be handled in the template. > > Even though you don't like the example, I think it is illustrative. > Your ... > hides a lot. It hides the fact that you would actually need a for loop > here > because you don't know how many columns you will need to initialise. > So now > you have a for loop in your template that doesn't produce any output, > you're > using TAL as a programming language but TAL makes a pretty poor > programming > language as you can see > >
    >
    >
    tal:omit-tag /> >
    You don't really need the for-loop for columns of the same width: But you're right, the '...' does hide a lot. it *was* a poor example :). You're right that I am trying to use TAL as a programming language (though in a minimalist kind of way). But that's what I see template systems as. I think the point is that we're coming at this from slightly different angles, and there's nothing wrong with that. You prefer to do as little as possible in the templates, whereas I prefer to do a little bit more. But only a little bit, mind you! I've worked on systems where half the application logic was hard-coded into the templates... tell me how you're supposed to debug/test that.. *shudders* > apart from being horribly verbose and cumbersome, there's lots more > functionality missing from TAL the programming language, so rather than > turning TAL into a very bad programming language you should do all your > calculating in functions > > > ... >
    > > that way you can use it in all your other templates too. The major problem I have with doing this is that my HTML guy can't come along and change table widths and other presentational things. Which means I have to do it (but heck, I'm doing everything at the moment ;-). On projects where the back-end functionality is very complicated or labour intensive I like to be able to off-load as much of the front-end work as possible. > I know your example was a bad one but I don't think there is an > example where > it isn't easier to just put it in a function and you'll be glad of it > if you > ever have to let someone non-technical near your templates. If I do let that happen, there will be a certain amount of trust involved. > Just because > something is a presentation issue doesn't mean the code for it has to > be in > the template. Zope comes with a package of utility functions for table > layout > and other common things and I got the impression that TAL is the way > it is > because it's predecessor (DTML) allowed people to do too much > programming in > the templates and caused a lot headaches, The pendulum swings... I guess it's a matter of finding a balance that works for you. I prefer tools that don't limit what you can do too much - this way you can put your own limitations in place. And in general TAL/Petal lets me do that. Which is a good thing. I agree utility functions are a good idea (I've introduced a few in the project I'm working on, such as a date string formatting tool). As an aside, I think that that's one place where Petal suffers from an out-of-the box point of view - it needs more standard plugins. -Steve From spurkis at quiup.com Wed May 28 12:54:04 2003 From: spurkis at quiup.com (Steve Purkis) Date: Wed May 28 11:58:50 2003 Subject: [Petal] [PATCH] refactored Petal::Hash::Var + todo tests Message-ID: Hi, I've done a major refactoring of Petal::Hash::Var with the following goals in mind: * extensibility * readability * improved error reporting The patch introduces a parser object to Petal::Hash::Var. IMHO, this would do better off as something like Petal::Expression::Parser - then other objects would be able to use it (which is what I was originally planning on doing to auto-vivify things in Petal::Hash). Note that performance may drop slightly as a result of this patch: what used to be one static method has now become many different instance methods. I doubt this will be a big issue though. Other things this patch addresses: * Fixes a bug: $current->$next methods always called with @args * regexs are now pre-compiled (though I think I've missed a couple) * TODO tests for auto-vivifying hashes (should these be errors instead?) Regards, -Steve -------------- next part -------------- A non-text attachment was scrubbed... Name: Petal-0.92-refactor-var.patch Type: application/octet-stream Size: 27724 bytes Desc: not available Url : http://www.email-lists.org/pipermail/petal/attachments/20030528/532ea69f/Petal-0.92-refactor-var.obj From william at knowmad.com Wed May 28 09:29:06 2003 From: william at knowmad.com (William McKee) Date: Wed May 28 13:25:59 2003 Subject: [Petal] [PATCH] refactored Petal::Hash::Var + todo tests In-Reply-To: References: Message-ID: <20030528122906.GA873@knowmad.com> On Wed, May 28, 2003 at 11:54:04AM +0100, Steve Purkis wrote: > The patch introduces a parser object to Petal::Hash::Var. IMHO, this > would do better off as something like Petal::Expression::Parser - then > other objects would be able to use it (which is what I was originally > planning on doing to auto-vivify things in Petal::Hash). Have you looked at the TALES specs for type prefixes? It defines a prefix called `python:`. Jean-Michel has opted not to implement a similar prefix for perl to prevent punching holes in the security of the templating system (at least I think that's his reason). It sounds like the Petal::Expression::Parser that you are talking about could be implemented as a modifier a plug-in module. Personally, I follow the philosophy of templates as limited mini-languages. Thus I haven't needed the ability to run perl code or auto-vivify hashes inside of my templates. However, if it makes Petal a better tool, I'm generally all for it. > Note that performance may drop slightly as a result of this patch: what > used to be one static method has now become many different instance > methods. I doubt this will be a big issue though. That depends on the benefits that are gained. Not being familiar with the Petal::Hash::Var module, I can't offer an answer to that question. Hopefully Jean-Michel will have some input on this thread soon. In the meantime, have you done any benchmarking to see how big the speed difference is? Thanks, William -- Knowmad Services Inc. http://www.knowmad.com From jhiver at mkdoc.com Wed May 28 15:48:32 2003 From: jhiver at mkdoc.com (Jean-Michel Hiver) Date: Wed May 28 14:48:39 2003 Subject: [Petal] [PATCH] refactored Petal::Hash::Var + todo tests In-Reply-To: <20030528122906.GA873@knowmad.com> References: <20030528122906.GA873@knowmad.com> Message-ID: <20030528134832.GA22340@mkdoc.com> > > The patch introduces a parser object to Petal::Hash::Var. IMHO, this > > would do better off as something like Petal::Expression::Parser - then > > other objects would be able to use it (which is what I was originally > > planning on doing to auto-vivify things in Petal::Hash). That's cool, I'll try that when I get a minute, unfortunately I don't have many of them to spare at the moment. I hope waiting for a couple of weeks is not too bad... I think auto-vivifying hashes is an acceptable behavior. If it makes your life easier and no one else's worse then I don't see why we should not include this. However this change should not happen in Petal::Hash::VAR... > Have you looked at the TALES specs for type prefixes? It defines a > prefix called `python:`. Jean-Michel has opted not to implement a > similar prefix for perl to prevent punching holes in the security of the > templating system (at least I think that's his reason). Not really. It's just that I don't want to see Perl code in my templates, and having a 'perl:' modifier would be like trying not to smoke with an opened packet of ciggies on the table. Some people would be disciplined enough not to use 'perl:', I'm sure I wouldn't. :) > It sounds like the Petal::Expression::Parser that you are talking > about could be implemented as a modifier a plug-in module. This sounds like a good idea, until the patch is applied to Petal at least. > > Note that performance may drop slightly as a result of this patch: what > > used to be one static method has now become many different instance > > methods. I doubt this will be a big issue though. I am not so sure about this. Petal::Hash::VAR is basically called very, very, VERY often when a template is executed. I'll do some testing before I release anything to make sure it's not too bad... Cheers, -- Building a better web - http://www.mkdoc.com/ --------------------------------------------- Jean-Michel Hiver jhiver@mkdoc.com - +44 (0)114 255 8097 Homepage: http://www.webmatrix.net/ From fergal at esatclear.ie Wed May 28 23:18:43 2003 From: fergal at esatclear.ie (Fergal Daly) Date: Wed May 28 22:12:26 2003 Subject: [Petal] [BUG] can't set variables to static values In-Reply-To: References: Message-ID: <200305282218.43889.fergal@esatclear.ie> On Wednesday 28 May 2003 11:47 am, Steve Purkis wrote: > On Monday, May 26, 2003, at 02:22 am, Fergal Daly wrote: > Ahh, a shame that. It's not very intuitive from a Perly point of view. > And I'm assuming Petal aims to be 100% TAL compliant? I don't think so. There are already some things you can with Petal that you can't do with TAL so one more wouldn't be out of the question. > I'd be inclined to implement it anyway, but if no-one else would use it > then it's not really worth it. So perhaps Petal::Hash should be > modified to throw an error if you attempt the above? At least that > would save anyone else from falling into the same trap... There certainly should be an error at least. If you are going to implement it, here's something else to think about. path:a/b can mean $hash->{'a'}->b() or $hash->{'a'}->{'b'} depending on whether a is an object or a hash. Also path:a/0 can mean a hash or an array dereference. This gives rise to the question of what to autovifvify if you try to set a/0, a hash or an array? Most likely an array I suppose. > You don't really need the for-loop for columns of the same width: > > There is a crucial difference between Petal and TAL, at the moment Petal doesn't do local variables whereas TAL does them by default, so in TAL you can do ...
    you don't have to worry about overwriting the old value of cols and colwidth because once you get to the , the old values will come back. But like I said, TAL doesn't do that yet. > The pendulum swings... I guess it's a matter of finding a balance that > works for you. I prefer tools that don't limit what you can do too > much - this way you can put your own limitations in place. And in > general TAL/Petal lets me do that. Which is a good thing. I want as little as possible in the templates, I guess we just differ on our wants. > I agree utility functions are a good idea (I've introduced a few in the > project I'm working on, such as a date string formatting tool). As an > aside, I think that that's one place where Petal suffers from an > out-of-the box point of view - it needs more standard plugins. Yeah. TAL is just a small piece of Zope. Petal stands alone and so is missing all the standard utilites that come with Zope. I guess someone should look at what utilities Zope provides for templates and produce something similar... but not me. F From jhiver at mkdoc.com Thu May 29 09:58:42 2003 From: jhiver at mkdoc.com (Jean-Michel Hiver) Date: Thu May 29 08:58:47 2003 Subject: [Petal] [BUG] can't set variables to static values In-Reply-To: References: <200305260222.07774.fergal@esatclear.ie> Message-ID: <20030529075842.GA29356@mkdoc.com> > I agree utility functions are a good idea (I've introduced a few in the > project I'm working on, such as a date string formatting tool). As an > aside, I think that that's one place where Petal suffers from an > out-of-the box point of view - it needs more standard plugins. Well, I agree and I disagree! Petal doesn't need more standard plugins, Petal needs more optional CPAN plugins. Petal will automatically look in @INC and import named Petal::Hash:: and assign it to 'something:', so anybody can quite easily write Petal plugins. Once the plugin is installed on the system Petal will pick it up as if by magick! So everybody is quite welcome to write plenty of wonderful, useful plugins and upload them on CPAN :) All the best, -- Building a better web - http://www.mkdoc.com/ --------------------------------------------- Jean-Michel Hiver jhiver@mkdoc.com - +44 (0)114 255 8097 Homepage: http://www.webmatrix.net/ From jhiver at mkdoc.com Thu May 29 13:08:10 2003 From: jhiver at mkdoc.com (Jean-Michel Hiver) Date: Thu May 29 12:08:16 2003 Subject: [Petal] [TRICK] Custom modifiers in your applications with Petal Message-ID: <20030529110810.GA31402@mkdoc.com> Hi List, I would like to submit this trick to the list. Your applications are split in a horde of modules, and you would like to access some of the those modules functionality from Petal. For example, let's imagine that you have a class 'FruitFactory' with a static instanciate ($fruitclass, @args) method that instanciates fruits. You want to be able to instanciate those fruits from Petal. In your FruitFactory class, write: use Petal; # sell your soul! $Petal::Hash::MODIFIERS->{'new_fruit:'} = sub { my $hash = shift; my @args = @_; return FruitFactory->instanciate (@_); }; Then from your template you can do:

    Banana

    At the moment I use this technique to instanciate various objects (config, web logic, data objects) which I need to use and it works well! Cheers, -- Building a better web - http://www.mkdoc.com/ --------------------------------------------- Jean-Michel Hiver jhiver@mkdoc.com - +44 (0)114 255 8097 Homepage: http://www.webmatrix.net/ From william at knowmad.com Thu May 29 09:36:49 2003 From: william at knowmad.com (William McKee) Date: Thu May 29 13:33:39 2003 Subject: [Petal] [TRICK] Custom modifiers in your applications with Petal In-Reply-To: <20030529110810.GA31402@mkdoc.com> References: <20030529110810.GA31402@mkdoc.com> Message-ID: <20030529123649.GC873@knowmad.com> On Thu, May 29, 2003 at 12:08:10PM +0100, Jean-Michel Hiver wrote: > At the moment I use this technique to instanciate various objects > (config, web logic, data objects) which I need to use and it works well! Hey Jean-Michel, this trick looks interesting, but I'm not making the leap from the FruitFactory ex. to instanciating config or web logic objects. Could you fill in the details a bit for me. I'm particularly interested in the config object. It sounds like you are using this object to build a config page that allows a user to modify the values stored by your application. I have a need for such a solution RSN. Thanks, William -- Knowmad Services Inc. http://www.knowmad.com From jhiver at mkdoc.com Thu May 29 15:07:33 2003 From: jhiver at mkdoc.com (Jean-Michel Hiver) Date: Thu May 29 14:07:40 2003 Subject: [Petal] [TRICK] Custom modifiers in your applications with Petal In-Reply-To: <20030529123649.GC873@knowmad.com> References: <20030529110810.GA31402@mkdoc.com> <20030529123649.GC873@knowmad.com> Message-ID: <20030529130733.GA32377@mkdoc.com> > I'm particularly interested in the config object. It sounds like you > are using this object to build a config page that allows a user to > modify the values stored by your application. I have a need for such a > solution RSN. Unfortunately I'm not, I'm just doing that to fetch some config values... I have a module that'll turn an XML file into a text email, and I'm using Petal to produce the XML file, and some of the values (From, CC, Organization...) need to be taken out of the config. ------------- %< completely OT ------------- As for your problem, if you need a quick solution you can always store the config in a database, re-write your config module to attack the database (using the same API), and use an open-source database web admin tool as an interface to your config (I know, it always sounds easier than it is...) Of course the only bit of config that you could not administrate would be the database connection parameters themselves. ------------- TO yletelpmoc >% ------------- Cheers, -- Building a better web - http://www.mkdoc.com/ --------------------------------------------- Jean-Michel Hiver jhiver@mkdoc.com - +44 (0)114 255 8097 Homepage: http://www.webmatrix.net/ From chris at webarchitects.co.uk Thu May 29 17:05:50 2003 From: chris at webarchitects.co.uk (Chris Croome) Date: Thu May 29 16:05:51 2003 Subject: [Petal] [INFO] Dublin Core Translation Tool Message-ID: <20030529150550.GC5876@webarchitects.co.uk> Hi ----- Forwarded message from "Wagner,Harry" ----- Date: Thu, 29 May 2003 10:56:40 -0400 From: "Wagner,Harry" Subject: Registry Phase 2 & New Translation Tool To: DC-INTERNATIONAL@JISCMAIL.AC.UK A companion application - the DCMI Translation Tool - is also now available. This tool is open-source and serves 2 purposes: - Provides a convenient, and simplified, means of translating the DCES, qualifiers, etc. and for translating the Registry user interface. - Demonstrates, by example, how an application can utilize the Registry application interface. The application is available at: http://wip.dublincore.org/translate/index.html. There is also a link on this page for the application source code. The translate tool currently supports English, German and Japanese user interfaces, and includes a property editor which facilitates the creation of additional translations. I encourage you to try this application, particularly if your language is not currently supported by the Registry, or if the current Registry translation is incomplete. ----- End forwarded message ----- -- Chris Croome web design http://www.webarchitects.co.uk/ web content management http://mkdoc.com/ From chris at webarchitects.co.uk Thu May 29 17:17:44 2003 From: chris at webarchitects.co.uk (Chris Croome) Date: Thu May 29 16:17:45 2003 Subject: [Petal] Re: [INFO] Dublin Core Translation Tool In-Reply-To: <20030529150550.GC5876@webarchitects.co.uk> References: <20030529150550.GC5876@webarchitects.co.uk> Message-ID: <20030529151744.GD5876@webarchitects.co.uk> Hi Aarh, worong list....! Sorry Chris On Thu 29-May-2003 at 04:05:50PM +0100, Chris Croome wrote: > Hi > > ----- Forwarded message from "Wagner,Harry" ----- > > Date: Thu, 29 May 2003 10:56:40 -0400 > From: "Wagner,Harry" > Subject: Registry Phase 2 & New Translation Tool > To: DC-INTERNATIONAL@JISCMAIL.AC.UK > > A companion application - the DCMI Translation Tool - is also now > available. This tool is open-source and serves 2 purposes: > > - Provides a convenient, and simplified, means of translating the > DCES, qualifiers, etc. and for translating the Registry user > interface. > > - Demonstrates, by example, how an application can utilize the > Registry application interface. > > The application is available at: > http://wip.dublincore.org/translate/index.html. There is also a > link on this page for the application source code. > > The translate tool currently supports English, German and Japanese > user interfaces, and includes a property editor which facilitates > the creation of additional translations. I encourage you to try > this application, particularly if your language is not currently > supported by the Registry, or if the current Registry translation is > incomplete. > > ----- End forwarded message ----- -- Chris Croome web design http://www.webarchitects.co.uk/ web content management http://mkdoc.com/ From 587nzeoyn6 at commercecheck.com Sat May 31 19:32:25 2003 From: 587nzeoyn6 at commercecheck.com (Lawanda Frederick) Date: Sat May 31 13:35:47 2003 Subject: [Petal] Re: is there a way to resolve a such situation? cge sudiy sat Message-ID: <0e03g926g74-5t$ofb2--7v@rob.io2g> An HTML attachment was scrubbed... URL: http://www.email-lists.org/pipermail/petal/attachments/20030531/5a2a63dd/attachment.htm