Subject: RE: Bringing HTML through From: "ciaran byrne" <ciaran.byrne@xxxxxxx> Date: Sat, 28 Oct 2000 15:24:52 -0700 |
If you're using MSXML than why aren't you using a loadXML method to load/parse the content into a DOM ? This would create the "i" element. Transforming the DOM then shouldn't be a problem. You just apply a stylesheet to the DOM in question. I suspect that at the moment you are treating <i>head</i> as a text node in the DOM. The xsl sees this as a text node and not as an element and therefore performs a transformation to get <i;>Hello. What language are you implementing your MSXML solution in ? -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Ian Sparks Sent: Tuesday, October 17, 2000 8:22 AM To: xsl-list@xxxxxxxxxxxxxxxx Subject: Bringing HTML through I posted this one to the MSXML newsgroup some time back but so far haven't had a response. I'm pleased I signed up to this list since there seem to be some real experts here (thanks guys!). Hopefully I'll be able to start contributing rather than just asking questions soon. ..... I have a problem with bringing XML documents through from a database. I want to store the following in my database record : "<i>Hello</i>" I need to pull this data out, put it into a DOM tree and then pass it to the XSL filter for processing. I want to get the same structure carried through into my resulting HTML file (so "Hello" appears in italics). Problem #1 : As soon as I load the text "<i>Hello</i>" as the text of a node it gets transformed into <i;>Hello... style. Not what I want. Problem #2 : Lets say I put this data into a CDATA section to carry it through, I still can't work out how to pull the contents of that section out and have it carried through to my HTML without it getting transformed into <i;>Hello... For security reasons I might want to limit the tags that can be carried-through in this way (maybe allowing italic, bold, HREFs etc but disallowing script or anything potentially malicious). All insight appreciated. I suspect xsl:copy is involved but I can't work it out! - Ian Sparks. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Splitting and Sorting, Stephan Schmidt | Thread | RE: Bringing HTML through, Weakliem, Gordon |
[no subject], Melvyn Rosengarden | Date | Mail loop revisited, XSL-List Owner |
Month |