cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@infoplanning.com>
Subject Re: one more sitemap idea
Date Thu, 08 Jun 2000 15:47:32 GMT


Neeme Praks wrote:

> > -----Original Message-----
> > From: Berin Loritsch [mailto:bloritsch@infoplanning.com]
> > Sent: Thursday, June 08, 2000 5:12 PM
>
> [snip]
>
> > We could also go hog wild with a complete i18n and l10n
> > implementation...
>
> I'm not familiar with i18n and l10n, although the terms keep popping up
> constatly. Can someone make a sort explanation of these?

They are shorthand for larger words:
internationalization - i18n
localization - l10n

Derived from the first and last letters and the number of letters in
between.

> > But, if we want to keep it simple (+500000 on that), your
> > second suggestion
> > will probably be the best.  I'm not sure what the advantage
> > of using the
> > xml:lang attribute would be here.  It adds unnecessary
> > verbosity and doesn't
> > add any known benefit.
>
> well, I was thinking of it as an aid for the sitemap admin and sitemap
> authoring tools...

Oh.  I don't have the big picture in my mind yet.

> > If your purpose was to pass the attribute to your stylesheet, then we
> > probably
> > ought to have a way to add parameters to the request.  Something like:
> > <request-parameter name="xml:lang" value="en"/>, but you
> > could also do that
> > in the URL itself.
>
> I didn't think that far, but this makes perfect sense... So I don't need
> a some silly querystring variable to determine the language... I just
> type the URL in that language and get what I need... Whoa, I love this
> solution ;-)
>
> > Here's a crazy thought--feel free to shout it down--XSLT has
> > a mechanism
> > to create attribute groups that you can apply in multiple
> > spots in your
> > stylesheet.
>
> "attribute group"? Can you explain the concept a little bit more? (I
> probably should go to W3C site and update my knowledge about the latest
> X* standards...)

If you specify this:

<xsl:attribute-set name="scope">
  <xsl:attribute name="font-size">10pt</xsl:attribute>
  <xsl:attribute name="font-family">sans-serif</xsl:attribute>
  <xsl:attribute name="line-height">13pt</xsl:attribute>
</xsl:attribute-set>

You can do this:

<fo:block xsl:use-attribute-sets="scope"/>

And XSLT will translate it to this:

<fo:block font-size="10pt" font-family="sans-serif" line-height="13pt"/>

I was just referring to the ability to get in the mindset for the
inheritance mechanism.  Basically, I was thinking of something
along the lines of the <target> system in Jakarta-Ant.

> > If Sitemap had a way of specifing an <process> inheritance
> > heirarchy, your example would be restated like this:
> >
> > <process uri="user/add" name="add-user">
> >   <!-- your processing tree here -->
> > </process>
> > <process uri="kasutaja/lisa" extends="add-user">
> >   <!-- Anything specified here overrides the root description -->
> > </process>
> > <!-- for simple aliases, you would have an entry like this: -->
> > <process uri="usador/insertar" extends="add-user"/>
> >
> > Will this be insane or what?
>
> well, yes... this could be a solution...
> how would you add the language parameter then? Something like this?
>
> <process uri="user/add" name="add-user">
>   <request-parameter name="lang" value="en"/>
>   <!-- your processing tree here -->
> </process>
> <process uri="kasutaja/lisa" extends="add-user">
>   <request-parameter name="lang" value="ee"/>
> </process>
> <process uri="usador/insertar" extends="add-user">
>   <request-parameter name="lang" value="{what language is that, looks
> like spanish or something?}"/>
> </process>
>
> Not sure about the implementation, though ;-)
>
> Neeme

That was Spanglish (I'm a little rusty on my Spanish).  But basically,
that would work.  Now, going to your original suggestion, we could
rework it to be like this:

<process uri="user/add" name="add-user" xml:lang="en">
  <request-parameter name="lang" value="${xml:lang}">
</process>
<process uri="kasutaja/lisa" extends="add-user" xml:lang="ee"/>
<process uri="usador/insertar" extends"add-user" xml:lang="es"/>


Mime
View raw message