ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xsl-list
xsl-list
[I18n-sig] Listas de e-mail para mala direta
by Lucy Carmo other posts by this author
Sep 9 2004 9:56PM messages near this date
AW: AW: AW: AW: AW: AW: [xsl] xhtml output formating problems / passing through pre defined static xhtml | Re: AW: AW: [xsl] xhtml output formating problems / passing through pre defined static xhtml
e-mails por cidade, lista e-mails, propaganda, mala direta por e-mails, 
campanha email, software spam internet, 

Visite agora:   http://www.divulgamail.mx.gs

Divulgação da Home Page em Sites de Busca, buscadores, Divulgação Sites 
Como divulgar home pages como divulgar sites como divulgar meu site, dicas 
de divulgação de sites. Otimização e posicionamento no Google., e-mail 
região, listas, listas segmentadas, marketing, marketing digital por 
emails, email região, divulgação e-mail, emails por cidade, mala-direta por 
email, marketing digital por e-mails, listas email, lista segmentada, 
cidades, cadastro email, divulgue seu produto, mala-direta por e-mails, 
e-mail por estado, segmentos, email por cidades, propaganda por e-mail, 
emails cidades, publicidade por emails, envio e-mail, e-mails por estado, 
mala direta, mala-direta, mala-direta por emails, e-mail segmentado, 
marketing digital emails, cidades, divulgação e-mails, marketing, e-mail 
estados, cidades, marketing por e-mail, envio emails, marketing digital 
email, propaganda 

Visite agora:   http://www.divulgamail.mx.gs

por email, envio anônimo email, divulgue sua propaganda, propaganda digital 
emails, cidade, emails por cidades, e-mails segmentado, propaganda por 
emails, divulgar email, e-mail cidade, enviar e-mails, e-mails, cadastro 
emails, e-mail por cidade, envio email, cadastro, lista, envio e-mails, 
propaganda digital email, publicidade por e-mails, marketing digital, 
e-mail por região, email por estados, divulgação, emails por estados, 
segmentados, mala-direta emails, envio publicidade, campanhas, mala direta 
por emails, e-mail por estados, marketing por e-mails, emails por estado, 
mala-direta e-mails, marketing digital e-mail, divulgar emails, emails 
regiões, publicidade, email por região, e-mails por regiões, listas e-mail, 
divulgação emails, mala-direta por e-mail, enviar e-mail, enviar email, 

Visite agora:   http://www.divulgamail.mx.gs

divulgação email, cidades, publicidade por e-mail, enviar, emails por 
regiões, marketing digital por e-mail, email por cidade, campanhas email, 
marketing digital por email, marketing digital e-mails, propaganda e-mails, 
e-mail segmentados, envio anônimo e-mail, software publicidade internet, 
segmentados, envio anônimo e-mails, lista mala direta, programa email 
anônimo, mala direta internet, publicidade email, mala direta segmentada, 
emails segmentados, marketing digital, mala direta email, publicidade%2GID 0, __HAS_X_PRIORI
TY 0, __MIME_VERSION 0, __SANE_MSGID 0'

Hi Arun,

>  I have just started doing coding in XSLT and stuck with a unique
>  problem. I have done the coding for grouping with fixed levels but
>  finiding the solution for this one is getting too complicated.

I'll give this a shot, but I'm not sure what you mean by "fixed
levels", so I'm not certain that this will do what you want.

You're lucky in that your source actually already contains the groups
that you need: usually they don't, and people have to manufacture the
groups using keys etc.

I've assumed that you've got a <Groups>  element wrapped around the
top-level <Group>  elements. Create a table at that level, and insert
the relevant column headers there. Then apply templates to all the
<Row>  elements within the <Groups> element: we know we need one row in
the table for each <Row>  in the source.

<xsl:template match="Groups"> 
  <table> 
    <thead> 
      ...
    </thead> 
    <tbody> 
      <xsl:apply-templates select=".//Row" /> 
    </tbody> 
  </table> 
</xsl:template> 

So we create one row per <Row>  in the source. Keep track of the ID of
the row: I'm using generate-id() here, but perhaps your source
actually has a unique identifier that you could use. To fill in the
first set of columns, you need to get the values from the <GroupValue> 
elements of the <Group>  elements in which the <Row> appears. But you
only want to output them if the row you're on is the first row within
the group. So locate that first row and get its ID ($first-row-id),
and only output the <GroupValue>  if that ID matches the one for the
current row.

<xsl:template match="Row"> 
  <xsl:variable name="row-id" select="generate-id(.)" /> 
  <tr> 
    <xsl:for-each select="ancestor::Group"> 
      <td> 
        <xsl:variable name="first-row-id" select="generate-id(descendant::Row[1])" /> 
        <xsl:if test="$row-id = $first-row-id"> 
          <xsl:value-of select="GroupValue" /> 
        </xsl:if> 
      </td> 
    </xsl:for-each> 
    <xsl:apply-templates select="ColumnValue" /> 
  </tr> 
</xsl:template> 

The rest of the cells are simply the values from the <ColumnValue> 
elements: that's very straight-forward:

<xsl:template match="ColumnValue"> 
  <td> <xsl:value-of select="." /></td>
</xsl:template> 

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@[...].com> 
--+--

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved