W
Wizfrog
Hello,
I'm unsing well-formed XML HTML tags as my formatted "Description"
content in a XML Database, so I have stuff of the sort:
<Description lang='en'><b>This is bold Text</b> and this is not<i>and
this is italic text</i></Description>
So far, nothing too dramatic, when I want to reproduce this as an HTML
output, I used the <xsl:copy-of> command to copy the whole node over
to my HTML output.
Now here comes where I have an issue:
I want to use a specific tag <spec name='specname'/> to insert
"Specifications" related to the product WITHIN the formatted text...
so it could be anywhere under <Description> or a <b> tag, or a <i>
tag ...
The idea is that products are built out of other products, and I want
to be able to have the specification propagate through to the higher
level products, so I only want to "reference" the spec name in the
Description, and pull it out from the lower level product at the time
of output.
So, my problem is to "fill in" my <spec name='specname'/> tag with its
content coming from somewhere else.
The <xsl:copy-of> can no longer be used here, and it doesn't do the
job, but then is there an easy way to "transfer" all of the XML/HTML
and just replace the tag i want to replace?
I obviously need to parse the whole thing, but tags can be anything,
anywhere, (from the selection of formatting tags <b>, <i>, <u>, <br/>,
<p>, <sub>, <sup> etc...)
I'm not so proficient in XPath to figure out what would be the path I
want to select to transfer all tags but my <spec> tag, and when
bumping into one, replacing it with my data.
any insight?
Suggestion appreciated!
Thanks
I'm unsing well-formed XML HTML tags as my formatted "Description"
content in a XML Database, so I have stuff of the sort:
<Description lang='en'><b>This is bold Text</b> and this is not<i>and
this is italic text</i></Description>
So far, nothing too dramatic, when I want to reproduce this as an HTML
output, I used the <xsl:copy-of> command to copy the whole node over
to my HTML output.
Now here comes where I have an issue:
I want to use a specific tag <spec name='specname'/> to insert
"Specifications" related to the product WITHIN the formatted text...
so it could be anywhere under <Description> or a <b> tag, or a <i>
tag ...
The idea is that products are built out of other products, and I want
to be able to have the specification propagate through to the higher
level products, so I only want to "reference" the spec name in the
Description, and pull it out from the lower level product at the time
of output.
So, my problem is to "fill in" my <spec name='specname'/> tag with its
content coming from somewhere else.
The <xsl:copy-of> can no longer be used here, and it doesn't do the
job, but then is there an easy way to "transfer" all of the XML/HTML
and just replace the tag i want to replace?
I obviously need to parse the whole thing, but tags can be anything,
anywhere, (from the selection of formatting tags <b>, <i>, <u>, <br/>,
<p>, <sub>, <sup> etc...)
I'm not so proficient in XPath to figure out what would be the path I
want to select to transfer all tags but my <spec> tag, and when
bumping into one, replacing it with my data.
any insight?
Suggestion appreciated!
Thanks