|
Subject: [xsl] question about apply-templates / following-sibling From: Marko Petersen <lg002237@xxxxxxxxxxxxxxxx> Date: Thu, 12 Dec 2002 15:58:22 +0100 |
I would like to update some XML documents by inserting an element. The documents are vaild to the DocBook DTD, but the following is a simple subset which shows the problem I have:
<!ELEMENT chapter
( beginpage?, chapterinfo?, title
(index)*,
(
(
(para | %chapter.elements; | beginpage)+,
(section* | simplesect*)
) |
(section+ | simplesect+)
),
(index)*,
)
><chapter> <beginpage pagenum="1"> <title>test</title> <index>index stuff</index> <index>index stuff</index> <para>text1</para> <beginpage pagenum="2"> <!-- the new para should be here --> <index>index stuff</index> <index>index stuff</index> </chapter>
<xsl:template match="chapter">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<!-- copy everything before new para, including index elements -->
<para>New para</para>
<!-- copy everything after new para, including index elements -->
</xsl:copy>
</xsl:template>| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: AW: [xsl] Problem on: Cascading, "Braumüller, Hans" | Thread | Re: [xsl] question about apply-temp, Marko Petersen |
| AW: [xsl] Problem on: Cascading xsl, "Braumüller, Hans" | Date | Re: AW: [xsl] Problem on: Cascading, David Carlisle |
| Month |