RE: [xsl] Advice for splitting text

Subject: RE: [xsl] Advice for splitting text
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Tue, 21 Oct 2003 14:53:03 -0400
[Karl J. Stubsjoen]

> You know how in a news column online a lot of times you'll 
> read a paragraph
> of the article and then there will be a link for "Read More", 
> and you'll
> either follow an anchor on the same page to the rest of the 
> article or jump
> to a new page all together.  So what I'd like to do is 
> provide a text object
> embedded in the article which signifies that the more link 
> should be place
> here.  See "[BREAKARTICLE]" in this example:
> 

> <ARTICLE id="1234">
>     <HEADING>This Article</HEADING.
>     <CONTENT>
>         This is the content This is the content This is the 
> content This is
> the content This is the content This is the content
>         This is the content This is the content This is the 
> content This is
> the content This is the content This is the content
>         This is the content This is the content This is the 
> content This is
> the content This is the content This is the content
>         This is the content [BREAKARTICLE] This is the 
> content This is the <snip/>

Well, the first thing to figure out is how to know _where_ to break.
That will probably be the hardest part if you want to do it
automatically.  As for putting the [BREAKARTICLE] into the text, why
ever would you not use xml markup indicating in - as in <BREAKARTICLE/>
or even a processing instruction <?BREAKARTICLE ?> ?  After all, you
have xml markup in the article already.  Your  [BREAKARTICLE] amounts to
a non-standard markup.  Use a standard instead.

As for hiding it, that depends on how you will be displaying it in the
first place.  If you are going to run it through an xslt stylesheet, and
you use xml for the break indicator, it should be trivial to hide
whatever you want to hide.  Creating the daisy chain of continuation
links will depend on your processing system, whatever that is.

Cheers,

Tom P

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread