RE: [xsl] href's in xml node data

Subject: RE: [xsl] href's in xml node data
From: "Crawford, Bradley" <Bradley.Crawford@xxxxxxxxxxxxxx>
Date: Wed, 12 May 2004 14:38:52 +1000
Thanks for the response Jarno, basically it's for a CMS system so we allow
users to upload their content into the system as a parsed html block (to
remove head tags etc and to wellform the br's and p tags etc)....most
similar thing I can think of to describe it would be a blog, where content
is uploaded into a single node but that content could contain any number of
href's, ul's and such.

At this stage though I am fairly certain I can limit all the html tags
through preparsing into their own tags by spliting the content up, it's just
the href's that have me stuck. Will play around with what you have suggested
now and see where I get, but if you can think of anything else now with a
more expanded explanation I'm sure it will be useful.

-----Original Message-----
From: Jarno.Elovirta@xxxxxxxxx [mailto:Jarno.Elovirta@xxxxxxxxx]
Sent: Wednesday, 12 May 2004 2:32 pm
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] href's in xml node data


Hi,

> I've serached the archives et al., as well as looked through all the
> reference books and such I can find but can't seem to find an 
> answer as to
> if the following is possible to transform through xsl a document that
> contains things such as hrefs and mailto in a document data 
> node, such as
> the following.

b& yes it's possibilebwhat do you want the result document to look like?

> If it is possible, how would it be done?
 
E.g.

<xsl:template match="test">
  <h1>
    <a href="maito:{email}">
      <xsl:value-of select="author"/>
    </a>
  </h1>
  <p>
    <xsl:apply-templates select="content/node()"/>
  </p>
</xsl:template>
<xsl:template match="a">
  <a href="maito:{email}">
    <xsl:apply-templates />
  </a>
</xsl:template> 

Cheers,

Jarno - Madam Zu: September 2002 Mix

----------------------------------------------------------------------------
------------------------------------------ 
 This email, and any attachments, may be confidential and also privileged.
If you are not the intended recipient:
Please notify the sender and delete all copies of this transmission along
with any attachments immediately.
You should not copy or use it for any purpose, nor disclose its contents to
any other person.
----------------------------------------------------------------------------
------------------------------------------

Current Thread