i am trying to create a transformation which output will be text but including original xml as well. Simply i got the xml message that should be transformed to SQL insert but in case of an SQL error i want to insert the original xml message to database as well.
The input is e.g.:
<message><tag name="foo">dummy</tag></message>
The result of the transformation should be then:
INSERT INTO table (column) VALUES ('dummy')
IF @@error <> 0
BEGIN
INSERT INTO errMsgLog (message) VALUES ('<message><tag name="foo">dummy</tag></message>')
END
The problem is if i set the output in XSLT to 'text' there are no xml tags included (just the values). So is there any mixed output mode or attribute override?
Thanks for any help.