Maybe there is a better way of describing my problem…
Here is an example of what I would like to do:
Take this:
<inc_3c>
<Title>This is 3C</Title>
<Subtitle>Lorem ipsum dolor consectetur adipiscing elit. Fusce mattis consequat malesuada.</Subtitle>
<Description>Consectetur adipiscing elit. Fusce mattis consequat malesuada. Nullam vel justo a dui pellentesque euismod. Integer eu pulvinar dolor.</Description>
<Class>priceWrapper</Class>
<Price>$00.00</Price>
<Url>Url</Url>
<Image>apple-tv.png</Image>
</inc_3c>
and copy it like so:
<inc_3c-copy>
<Title>This is 3C</Title>
<Subtitle>Lorem ipsum dolor consectetur adipiscing elit. Fusce mattis consequat malesuada.</Subtitle>
<Description>Consectetur adipiscing elit. Fusce mattis consequat malesuada. Nullam vel justo a dui pellentesque euismod. Integer eu pulvinar dolor.</Description>
<Class>priceWrapper</Class>
<Price>$00.00</Price>
<Url>Url</Url>
<Image>apple-tv.png</Image>
</inc_3c-copy>
- inc_3c = would populate content on page#1
- inc_3c-copy = would populate content on page#2
might even be a scenario where inc_3c and inc_3c-copy live on the same page.
hopefully I wouldn’t need to create another XSL page.
this would have to be non-coder proof.
Learn about using the identity rule/template and overriding it. This alone is the most fundamental and powerful XSLT design pattern.
In your case we use this design pattern to override just the top element in the following way:
When applied on the provided XML document:
the wanted, corresct result is produced: