I am trying to build a Transformer from a String, so I am creating a StringReader as a StreamSource. I know that the String contains a valid XSLT document. Is there any reason this should not work?
 
Here is my code snippet:
 
    StringReader stringReader = new StringReader(xsltString);
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer(new StreamSource(stringReader));
 
    /* Create the outputDoc.*/
    outputDoc = new DocumentImpl();
 
    /* Perform the transformation.*/
    transformer.transform(new DOMSource(rootDataElement), new DOMResult(outputDoc));
Thanks in advance.
 
Cory
 
 
 
BEGIN:VCARD
VERSION:2.1
N:Isaacson;Cory;;;(Compuflex)
FN:Cory Isaacson (Compuflex)
ORG:CompuFlex International
TITLE:President & CTO
TEL;WORK;VOICE:(818) 884-1168
TEL;CELL;VOICE:(818) 359-2615
TEL;WORK;FAX:(818) 884-0178
ADR;WORK:;;21124 Banlynn Court;Topanga;CA;90290;United States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:21124 Banlynn Court=0D=0ATopanga, CA 90290=0D=0AUnited States of America
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20010327T203314Z
END:VCARD


Reply via email to