Subject: [xsl] BOUNCE firstname.lastname@example.org: Admin request of type /\bremove\b/i at line 1|
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx (by way of B. Tommie Usdin)
Date: Thu, 11 Jan 2001 09:28:43 -0500
From Kurt.Devlin@xxxxxxxxxxxxx Wed Jan 10 11:52:57 2001Received: from electabuzz.westgroup.com (electabuzz.westgroup.com [126.96.36.199])
I need to remove some PCDATA prior to a specified element. I am rendering my XML to HTML. In the main section I want all the information shown. In the table of references that gets generated at the end of the document, I want to strip certain elements and the PCDATA that appears directly before that element.
Currently, I have templates that ignore the elements that I'm not interested, but I'm not sure how to get to the PCDATA before this element.
I have created a simple example of what I want to do below. In this example it would be simple to just look at the elements that I do want, but in my real project there are too many elements that I do want. I really only want to add a couple of templates to handle ignoring the element and its preceding PCDATA.
Regards, Kurt --- Simple Example --- DTD <!ELEMENT book (#PCDATA | title | author | date)* > <!ELEMENT title|author|date (#PCDATA) >
XML <book><title>My Book</title>, <author>Me</author>, <date>01-01-01</date></book>
HTML (main section) <u>My Book</u>, Me, (01-01-01)
HTML (reference section) <u>My Book</u>, Me ---