S
sixstringdork
I'm new to XML/XSLT. I have most of my transform working, but I have
some data enclosed with "edit" tags that need to be used to control
what HTML gets displayed. Here's a snippet of my XML:
<?xml version="1.0" encoding="iso-8859-1"?>
<rootCode>
<rootCodeTitle startDate='19781001'
endDate='99999999'><title>Chocolate Milk</title>
<chapter><title>CHAPTER 1. GENERAL PROVISIONS</title>
<subsec1><title>102. Rules of construction</title>
<subsec2>
<para>In this title</para>
<subsec3>
<title>(7)</title>
<para>the cow jumped over the moon;<edit startDate='19791001'
endDate='19861125'>and</edit><edit startDate='19861126'
endDate='99999999'></edit></para>
</subsec3>
<subsec3>
<title>(8)</title>
<para>the house, <edit startDate='19701001'
endDate='19831002'>continued</edit><edit startDate='19831002'
endDate='99999999'>contained</edit> a glass of milk<edit
startDate='19701001' endDate='19851125'>.</edit><edit
startDate='19851126' endDate='99999999'>; and</edit></para>
</subsec3>
<subsec3 startDate='19851126' endDate='99999999'><title >(9)</
title>
<para>When to shake the jug.</para>
</subsec3>
</subsec2>
</subsec1>
</chapter>
</rootCodeTitle>
</rootCode>
I'm passing an XSL parameter such as code_rev_date = '19800101' (a
date converted to a number). I want to display the text as it existed
on that date (the parameter date).
So I want to show, for example, most of /subsec3/para, but omit the
text that came after 19831002 (based on a parameter of 19800101. I've
been drifting around on W3.org, etc. for several days and I'm not
having much luck on how to approach this.
I hope this make sense. I can post my XSL sheet, but I don't think it
will be much help since it sucks.
(using classic ASP and IIS if it matters)
Thanks and sorry for the newbie question.
some data enclosed with "edit" tags that need to be used to control
what HTML gets displayed. Here's a snippet of my XML:
<?xml version="1.0" encoding="iso-8859-1"?>
<rootCode>
<rootCodeTitle startDate='19781001'
endDate='99999999'><title>Chocolate Milk</title>
<chapter><title>CHAPTER 1. GENERAL PROVISIONS</title>
<subsec1><title>102. Rules of construction</title>
<subsec2>
<para>In this title</para>
<subsec3>
<title>(7)</title>
<para>the cow jumped over the moon;<edit startDate='19791001'
endDate='19861125'>and</edit><edit startDate='19861126'
endDate='99999999'></edit></para>
</subsec3>
<subsec3>
<title>(8)</title>
<para>the house, <edit startDate='19701001'
endDate='19831002'>continued</edit><edit startDate='19831002'
endDate='99999999'>contained</edit> a glass of milk<edit
startDate='19701001' endDate='19851125'>.</edit><edit
startDate='19851126' endDate='99999999'>; and</edit></para>
</subsec3>
<subsec3 startDate='19851126' endDate='99999999'><title >(9)</
title>
<para>When to shake the jug.</para>
</subsec3>
</subsec2>
</subsec1>
</chapter>
</rootCodeTitle>
</rootCode>
I'm passing an XSL parameter such as code_rev_date = '19800101' (a
date converted to a number). I want to display the text as it existed
on that date (the parameter date).
So I want to show, for example, most of /subsec3/para, but omit the
text that came after 19831002 (based on a parameter of 19800101. I've
been drifting around on W3.org, etc. for several days and I'm not
having much luck on how to approach this.
I hope this make sense. I can post my XSL sheet, but I don't think it
will be much help since it sucks.
(using classic ASP and IIS if it matters)
Thanks and sorry for the newbie question.