If I have
<p>!!!This should be a note</p>
is it possible to convert the <p> tags to <note> tags using XSL (maybe using the !!! as an identifier?). Note that there would be other <p> tags that I wouldn't want to be converted. So the result would be
<note>!!!This should be a note</note>
or
<note>This should be a note</note>
Also, if I have
<p>This is an apiname</p>
and I want to use XSL to surround 'apiname' with <apiname> tags, example:
<p>This is an <apiname>apiname</apiname></p>
is there a way to do this?
I'm using DITA Open Toolkit to write Markdown, which is then converted to XML behind the scenes. Then, XSL is applied to the XML to display HTML and other formats. This is why I can't just update the XML from the source.
To convert only
pelements that start with!!!tonoteelements, you could do simply:XSLT 1.0
If you also want to remove the
!!!identifier, change the 2nd template to:I suggest you ask a separate question regarding the
apinameproblem, and clarify:apiname? Is it the literal string "apiname"?pcontain more than one occurrence ofapiname?