Problem Transforming

Hi All,
I am facing a problem transforming an XML document using XSLT.
I have two XML documents.One is the source document. In the XSL i refer to another XML document which is in the same folder as the source document using document() function.(My XSL is in a different folder).But i get error stating the XSLT Engine could not load the document.(Since it searches for the second document in the same folder where XSL is placed).
I tried using two argument document function one that takes in base URI as one of the arguments.But that failed too.
To be more clearer
My directory structure is as follows
folder1
- a.xml
- b.xml
folder2
-convert.xsl.
And now the source document for transformation is a.xml
and in convert.xsl i would like to refer to b.xml using document() fnction, which i am unable to.
I am using JDK1.4.1
Regards
Sathya

give a full URI in document() : file://whatever

Similar Messages

  • Ps CS6 Problem: Transform applied to Smart Object fails to transform an attached Smart Filters Mask

    Ps CS6
    OSX 10.6.8
    Problem: Transform applied to Smart Object fails to transform an attached Smart Filters Mask.
    I mean a Transform, including Free Transform, as found in the Edit menu.  A simple move by the Move Tool is OK.
    A workaround until this bug is squashed is to encapsulate the Smart Object + Smart Filters + Filter Mask inside another Smart Object and transform that.
    However, that will not be a satisfactory solution in some cases. If a filter has size parameter(s), e.g. Gaussian Blur radius, a scaling or warping/distorting transform applied after the filter will obviously differ from the filter applied after the transform.
    In any case, the workaround is inconvenient to subsequent editing and experimenting with filters and masks.

    R_Kelly wrote:
    I don't think that's a bug since the implementation seems to be purposely done.
    It's been that way since photoshop cs3.
    If its been like that since CS3 then I think it's a bug which remains because nobody (or not enough people) has complained before.

  • Ps CS6 Problem: Transform applied to Smart Object cannot be repeated on another target

    Ps CS6
    OS X 10.6.8
    Problem: Transform applied to Smart Object cannot be repeated on another target.
    "Edit > Transform > Again" fails to transform any target after a Transform is applied to a Smart Object. The following message appears:

    When ever I have a problem in CS6 and I have many I always test priot releases like cs2 cs3 cs5.  I nevet nitice before you posted this problem the Photoshop has different favlors of Free Transform and that free transform for CS6 has been modified.  Adobe seems to be introducind new improvement matche with new bugs, 
    Investgating your bug using CS5 I see the following.  There are two types of free transform one type seems to be for smart Object layers and the other for other layer types.  In CS5 you should see a difference in the Option bar for Free transform.
    The option bar for layers other then smart object looklike this:
    Transform 9 anchor point icons  X: field Relative icon Y: filed  W: % Constrain icon H: %  Angle ° H: ° V: °
    The Option Bar for Smart Object layers look like this:
    Transform 9 anchor point icons  X: field Relative icon Y: filed  W: % Constrain icon H: %  Angle ° Check Box Anti Alias (grayed out)
    If I use the one for other then smart object layers Transform Again is not gratey out and I can use Transform Again on layers even smart object layers However the anchor point seems to be relative always to the first transformed layer's anchor point
    If I use free transform on the smart Object Layer and not have done any transform on a other then smart object layer in this Photoshop session not even in an other document the smart object layer will be tramsformed and Transform again menu item will be grayed out. If any had done a Transform on an layer other then smart object layer even in an other document Transform Again would not be grayed out and could be used on the smart object layer at hand.  The transform would not be the one just done on the smart object layer rather it be the one done to the other then smart object layer.  Seems a bit bazzar to me.  This may be how CS6 is also working.
    CS6 also added interpolation method to the other then Smart object layer transform and not the one for smart object layers. To be consuitant Adobe should have also put interpolation into the omart opject transform for Adobe transforms smart opject layer by first rendering the pixels for the smart opject then transforms them like a raster layer.  Adobe did manage to record the interpolation use into an action step.  However I do not know if the made it into Scripting  it did not make it into the photoshop javascript user guide. I will test the scriptlistener plugin to see if it records it for the action manager....
    Message was edited by: JJMack
    I have now tested the Scriptlistner Plugin it does record the interpolation for transform normal layers. Still the layer resize method in the Photoshop Javascript user guide has not been change for that support. In the past what I have done is scripting was to save the users default interpolation Photoshop prenerenvr changed the preference to what I wanted to use do the layer transform resize then restored the users interpolation preferance.  Adobe broke that in CS6 if the users defalt preference is what Adobe's defalt is "Bicubic Automatic" an internal Photoshop error occurs. Adobe did not add "Bicubic Autoimatic" to scripting when I try to save the preference scriping has the internal error. There is also no way to set the preference back to "Bicubic Automatic.  I'm also transform smart object layers so I would still have to use the save preference, change preference, transform, restore preferance method.  This works if the users preference is set to some preference other the "Bicubic Automatic"
    Message was edited by: JJMack
    So to me it look like CS5 and CS6 transform work basiclly the same.  There seems to have been some behavior changes made to CS6 I can not seem to put my finger on as well as the addition of the interpolation method in the option bar. I can't put my finger on it so it may be the same in CS5 and CS6.
    It may have to do with the bazar behavior of Free Transform  and Transform Again not being available on smart object layers if no free transform to a normal layer has been done in this Photoshop session  but are available if one was done in any doument. And thet you can start to do a transform on the smart object layer and see the Transform handle but then start using transform Again shortcut Ctrl+Shift+T and watch the old transform being done perhaps rotating some virtual anchor point and not around the acnchor point bing displayed in the Transform bounding box and control points.
    Message was edited by: JJMack
    Over in the Adobe Feedback site several issues were posted with CS6 Transform one was marked "Not a problem" by Adobe. One was marked "Solved" by Adobe and the others have no Adobe markings the may on not be a problem
    So I beleive there is a bug but I do not think it originated in CS6 the bazar things I see happing also seem to be in CS5.

  • Problem Transforming modified in-memory XML doc

    In a web app, I'm using javascript to load an XML document and an XSL stylesheet. The XML data is presented in html with <input> tags to allow the user to modify the in-memory XML document. Whenever a user modifies the data, the in-memory XML document is modified accordingly, a xslt processor object is created using the in-memory stylesheet, the XML is transformed via XSL and the updated XML data is again presented in html with <input> tags, etc., etc.
    This is working fine when the user initially loads the page, and after the user performs any action that deletes content {i.e. nodeToDelete.parentNode.removeChild(nodeToDelete);}. However, I cannot get the html transform of the modified XML to work when the user adds content { var newElement = myXmlDoc.createElement('tag'); ... parentNode.appendChild(newElement);}. Using alert boxes I can see that the in-memory XML document is being modified correctly when you both delete and add content, but upon xsl transformation, only changes that delete content are being reflected in the resultant html. This is very confusing..
    At present, I am stumped and not sure how to proceed. I'm hoping someone out there may have encountered this problem previously and has a solution, or can tell me what I'm doing wrong. Thanks in advance for any help.

    In a web app, I'm using javascript to load an XML document and an XSL stylesheet. The XML data is presented in html with <input> tags to allow the user to modify the in-memory XML document. Whenever a user modifies the data, the in-memory XML document is modified accordingly, a xslt processor object is created using the in-memory stylesheet, the XML is transformed via XSL and the updated XML data is again presented in html with <input> tags, etc., etc.
    This is working fine when the user initially loads the page, and after the user performs any action that deletes content {i.e. nodeToDelete.parentNode.removeChild(nodeToDelete);}. However, I cannot get the html transform of the modified XML to work when the user adds content { var newElement = myXmlDoc.createElement('tag'); ... parentNode.appendChild(newElement);}. Using alert boxes I can see that the in-memory XML document is being modified correctly when you both delete and add content, but upon xsl transformation, only changes that delete content are being reflected in the resultant html. This is very confusing..
    At present, I am stumped and not sure how to proceed. I'm hoping someone out there may have encountered this problem previously and has a solution, or can tell me what I'm doing wrong. Thanks in advance for any help.

  • Problem transforming some tiff into jpg

    Hi, my problem is I'm trying to convert a tiff image into jpg image, my code it's working for some files but not with all, i'm receiving a String represent the tiff file in hex base and transform into baytearray of jpg my code is the next
    if someone have a similar problem and can helpme
    import java.awt.image.RenderedImage;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import javax.media.jai.JAI;
    import javax.media.jai.PlanarImage;
    import com.sun.media.jai.codec.ByteArraySeekableStream;
    public class Test {
         public static void main(String[] args) {
              Test g = new Test();
    //          bad image
              g.decodeImage("49492a00080000001100fe00040001000000000000000001030001000000800100000101030001000000050100000201030001000000010000000301030001000000040000000601030001000000000000000701030001000000010000000a01030001000000010000001101040001000000ea0000001501030001000000010000001601040001000000050100001701040001000000280300001a01050001000000da0000001b01050001000000e200000024010400010000000000000025010400010000000000000028010300010000000200000000000000c800000001000000c800000001000000ffffffffffffe6449c29d9afc27fd04e17f33fede825fff5ebea12bbfc2afaafbfc2f4abaffafafa7f85fd7097fff5f5ad7f5e16bd7fff5f356bc2a7aebfe134abafd5bfd05d6f2dd570a97ffffff5a4b0bfaeb855f5ffbf4bd2d6bbfaf0bd7ae17d6b2c7d53afd7df497ffe975fae124a12fffd57fa55faffebf4bf84bfd2f4ffd533010bc157821111210728c5299540ccbcca80789494ca034ccd9a1170cefcecc80c18336f68cc08559d920287eb3a063a9da906c5d725c2eb044085697c18ea0975583a50883bebf0df3b1606036175c18694ec481723cdd75831c2085bd257a9da404239874bf99dc221315af4bbcecb854baff41c205eaab8596387088ba20db55aea1b84104b0ba5c5373b4095d7d0698708155affb70825d2a4b49b8204beafb41ba055a5ae126e4d05a0ed6bd30e105d855ad43708209755eb785aa5a5d372b02d3afe15b8412ad7f86e104ee925d04487b740825aba58416dd2f497d2c3704157495692dd05ebaf5b70820975f825b7097a5d6961e105e952f0bbc2a8d7c25dc25a5f84b0dc2095a74b85de92a096a12c3c20bfdc25dc25d69610586f5412fc25dc20974b4820bbd6974a105b70924d1d445d05b7ac2fe961b84b4bab082cd1174478de4745d91d17d3d52c3e211080da221f5d21a44806c368c1dff709180d32398b6dc2a85915d82120d2921bde91d02b0ccc354ba2777edd20ac486584f70e97120d4250ade1aa840bd9176290f48d82a99b796edb86f087aa5def27478164e0befadbc109069390e43a70bdc190e5ac8e0d6937f5ac3218d4c3884cb760c7fcb1f22c07a2399c09c37d2d2786409c70852e183fff2081a447479b4898e82cd01de96937117a4aa36d86bebdb5092d061ef5d3fa492c30e58eebd7fa4922de0c3239edff5ef4124f40c45e142fb7bc2492e4402fd697630924ee0fffdb08249543262d4b4af1082492d6fe1e1a4bfd7d386217d696af85dffd270c168111ffafe185d5f6b695c7dd7ffd20afd2f7c7efba57abad7efbef5ffb7ded27e1c2e12636fafff0add6957ff76be1bf096fd3ee9dbeffb5eafc243e9b4b483edf0ea9609fb49a8daaa4361d3ac37f5eb5df15d2850de1add56d461a18ffffffffe00200");
              public byte[] decodeImage(String codigoEntrada){
                        byte[] data=hexStringToByteArray(codigoEntrada);
                        try {
                             ByteArraySeekableStream seekableStream = new ByteArraySeekableStream(data);
                             PlanarImage src = JAI.create("Stream", seekableStream);
                             byte[] data2=getByteArray(src);
                             return data2;
                        } catch (IOException e) {
                             System.out.println(e);
                        return null;
              public byte[] getByteArray(RenderedImage image) {
                        ByteArrayOutputStream bouts = new ByteArrayOutputStream();
                        JAI.create("encode", image, bouts, "jpg");
                        return bouts.toByteArray();
              public static byte[] hexStringToByteArray(String s) {
                       int len = s.length();
                       byte[] data = new byte[len / 2];
                       for (int i = 0; i < len; i += 2) {
                           data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) + Character.digit(s.charAt(i+1), 16));
                       return data;
    }thanks
    Edited by: hikarus on Mar 31, 2009 12:52 PM
    Edited by: hikarus on Mar 31, 2009 12:57 PM

    the problem is if you use this with the bad image
         public static void main(String[] args) {
            Test g = new Test();
               //          bad image
         g.saveImage("49492a00080000001100fe00040001000000000000000001030001000000800100000101030001000000050100000201030001000000010000000301030001000000040000000601030001000000000000000701030001000000010000000a01030001000000010000001101040001000000ea0000001501030001000000010000001601040001000000050100001701040001000000280300001a01050001000000da0000001b01050001000000e200000024010400010000000000000025010400010000000000000028010300010000000200000000000000c800000001000000c800000001000000ffffffffffffe6449c29d9afc27fd04e17f33fede825fff5ebea12bbfc2afaafbfc2f4abaffafafa7f85fd7097fff5f5ad7f5e16bd7fff5f356bc2a7aebfe134abafd5bfd05d6f2dd570a97ffffff5a4b0bfaeb855f5ffbf4bd2d6bbfaf0bd7ae17d6b2c7d53afd7df497ffe975fae124a12fffd57fa55faffebf4bf84bfd2f4ffd533010bc157821111210728c5299540ccbcca80789494ca034ccd9a1170cefcecc80c18336f68cc08559d920287eb3a063a9da906c5d725c2eb044085697c18ea0975583a50883bebf0df3b1606036175c18694ec481723cdd75831c2085bd257a9da404239874bf99dc221315af4bbcecb854baff41c205eaab8596387088ba20db55aea1b84104b0ba5c5373b4095d7d0698708155affb70825d2a4b49b8204beafb41ba055a5ae126e4d05a0ed6bd30e105d855ad43708209755eb785aa5a5d372b02d3afe15b8412ad7f86e104ee925d04487b740825aba58416dd2f497d2c3704157495692dd05ebaf5b70820975f825b7097a5d6961e105e952f0bbc2a8d7c25dc25a5f84b0dc2095a74b85de92a096a12c3c20bfdc25dc25d69610586f5412fc25dc20974b4820bbd6974a105b70924d1d445d05b7ac2fe961b84b4bab082cd1174478de4745d91d17d3d52c3e211080da221f5d21a44806c368c1dff709180d32398b6dc2a85915d82120d2921bde91d02b0ccc354ba2777edd20ac486584f70e97120d4250ade1aa840bd9176290f48d82a99b796edb86f087aa5def27478164e0befadbc109069390e43a70bdc190e5ac8e0d6937f5ac3218d4c3884cb760c7fcb1f22c07a2399c09c37d2d2786409c70852e183fff2081a447479b4898e82cd01de96937117a4aa36d86bebdb5092d061ef5d3fa492c30e58eebd7fa4922de0c3239edff5ef4124f40c45e142fb7bc2492e4402fd697630924ee0fffdb08249543262d4b4af1082492d6fe1e1a4bfd7d386217d696af85dffd270c168111ffafe185d5f6b695c7dd7ffd20afd2f7c7efba57abad7efbef5ffb7ded27e1c2e12636fafff0add6957ff76be1bf096fd3ee9dbeffb5eafc243e9b4b483edf0ea9609fb49a8daaa4361d3ac37f5eb5df15d2850de1add56d461a18ffffffffe00200");
           public String saveImage(String codigoEntrada){
              byte[] data=hexStringToByteArray(codigoEntrada);
              try {
                   File myFile = new File("C:/imagen.tif");
                   FileOutputStream fout = new FileOutputStream(myFile);
                   fout.write(data);
                   fout.close();
                   } catch (IOException e) {
                   e.printStackTrace();
         }the image is saved into a file and you can open to see with a external viewer like paint, it's possible this, if the image it's corrupted?

  • Problem transforming SAX events

    The following code parses a CSV file creating SAX events. If no XSL file is passed, it correctly does an identity transform and creates output so my assumption is that the parsing is working OK. However if I pass an xsl file containing the identity transfromation, I get no output and no exceptions. This is frustrating. Any ideas would be appreciated.
    String csvFileName = args[0];
    String xsltFileName = (args.length < 2)?null:args[1];
    TransformerFactory tranFactory = TransformerFactory.newInstance();
    tranFactory.setErrorListener(new SimpleErrorListener());
    if (!tranFactory.getFeature(SAXTransformerFactory.FEATURE)){
    System.out.println("SAXTransformerFactory is not supported");
    System.exit(1);
    SAXTransformerFactory saxTranFactory = (SAXTransformerFactory)tranFactory;
    TransformerHandler tranHandler = null;
    try{
    if (xsltFileName == null){
    tranHandler = saxTranFactory.newTransformerHandler();
    else{
    StreamSource s = new StreamSource(new File(xsltFileName));
    tranHandler = saxTranFactory.newTransformerHandler(s);
    catch(javax.xml.transform.TransformerConfigurationException e){
    e.printStackTrace();
    System.exit(1);
    try{          
    FileWriter f = new FileWriter(new File(xsltFileName+".out"));
    StreamResult r = new StreamResult(f);
    tranHandler.setResult(r);
    CSVXMLReader reader = new CSVXMLReader();
    reader.setContentHandler(tranHandler);
    reader.parse(new InputSource(new FileReader(csvFileName)));
    f.flush();
    }

    first problem solved. The parse method was missing endDocument().
    Now i get the following Exception:
    java.lang.NullPointerException at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3174) at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:433)
    at dpak.xml.CSVXMLReader.parse(CSVXMLReader.java:71)
    at dpak.xml.CSVXMLReader.main(CSVXMLReader.java:120)
    I am using XML Winter Pack release with xalan.jar and xerces.jar in the jre/ext directory.
    Stuck again. Any help would be appreciated.

  • Svg save problem: transform is expanded

    I've openned an svg file that was made in inkscape and want to save some changes, but Illustrator keeps saying it can't export certain items properly and the "Transforms are expanded".  It's refering to a part of the svg code where inkscape has used a transformation property to define where the graphic is positioned in relation to the document:
    <g id="icon-online" transform="translate(56.874894,769.7978)" inkscape:label="#icon-online">
                <linearGradient id="path12147_1_" gradientUnits="userSpaceOnUse" x1="245.8346" y1="-573.0281" x2="252.1426" y2="-576.7381" gradientTransform="matrix(0.6667 1.1549 1.1551 -0.667 506.0411 -658.5017)">
                <stop  offset="0" style="stop-color:#A0DA00"/>
                <stop  offset="1" style="stop-color:#7DBE0C"/>
            </linearGradient>
                <path id="path12147" inkscape:export-xdpi="300" inkscape:export-ydpi="300" sodipodi:type="arc" sodipodi:ry="4.5" sodipodi:rx="4.5" sodipodi:cy="7.5" sodipodi:cx="6.5" inkscape:export-filename="/Users/username/mit.png" fill="url(#path12147_1_)" stroke="#689E0A" stroke-width="1.4996" d="
                M11,13.197c-2.871,1.657-6.542,0.675-8.198-2.195C1.145,8.131,2.129,4.46,5,2.803c2.871-1.65 8,6.541-0.675,8.198,2.195
                C14.855,7.868,13.871,11.539,11,13.197z"/>
        </g>
    Is there any save setting or method I can use to get Illustrator to overcome this without redoing the document in some way?
    Thanks to anyone who can help

    This doesn't really have to do with the transform expanded problem (in which I'm still trying to find the right solution myself), but I noticed the problem of adding the "_1" as well, especially if you duplicate a group and rename it. Also, using spaces in a name generates a "_" and vice versa " " generates a "_". This has been a problem for me, since I use the layer names's later down the line, and address them dynamically with CSS or javascript. My svgs can tend to be thousands of lines, and if I have to edit hundreds (or even thousands) of malformed tags, it can be a pain.
    In ==> Illustrator ==> Preferences ==> Units ==> Identify Objects By: XML ID   <--This certainly made things WAY easier for me once I realized that I in this view the layers or groups in the will display the actual tag format that will get assigned to them. If you edit them in the layers menu while this unit view is active, the tags hold true on export. Hopefully that helps you as much as it did me.

  • Quicktime installer problems - transform path error

    Hi
    Been using quicktime for a while...finally installed the new itunes/quicktime version from apple..then got the message that i needed version 7.0.3...so downloaded it and before it downloaded it it removed my quicktime..but when i tried to install it again i got the following message:
    Error applying transforms. Verify that the specified transform paths are valid.
    C:\WINDOWS\Installer\{3868A8EE-5051-4DB0-8DF6-4F4B8A98D083}\1033.MST
    If anyone knows what to do to resolve this issue..i'd very much appreciate it.
    Thanks
    Jay

    I don't have a solution but found the exact same problem when I was testing security update 1 for a customised 8.1.2 deployment.
    I have decided NOT to deploy the update until it is fixed (or released as an MSP file so I can patch the MSI)
    I tried to contact Adobe support (UK) but they were not interested as we don't have a support contract :-(

  • Problem Transforming XML to JSF tags

    I have a fealing there is something I don't know here,
    I am transforming XML into a JSP that include tags from taglib http://java.sun.com/jsf/html (prefix="h")
    This is an section from my stylesheet
    <xsl:template name="forename">
    <h:inputText>
    <xsl:attribute name="value">#{abyss.myCustomer.forename}</xsl:attribute>
    </h:inputText>
    </xsl:template>
    which transforms my XML to exactly what I expect if a was writting it directly as a jsp
    <h:inputText value="#{abyss.myCustomer.forename}"></h:inputText>
    but it still looks like this after it is rendered in the browser, and not like
    <input type="text" name="dataCapture:j_id_id199" value="Customer Name" />
    which is how it looks if I cut and paste the result of the transformation into a jsp, and run that by itself
    Does anyone have any idea was the <h:inputText does not evaluate the tag in the browser after the transformation ?
    Edited by: OB1 on Nov 23, 2007 1:46 PM
    Edited by: OB1 on Nov 23, 2007 2:43 PM

    Unfortunatly I do, my jsp is
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
    <%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml_rt" %>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
    <html>
    <c:set value="${abyss.myBusinessServicePath}" var="xmldocpath"></c:set>
    <c:import url="${xmldocpath}" var="xmldoc"/>
    <c:import url="/xsl/transform.xsl" var="xslt"/>
    <x:transform xml="${xmldoc}" xslt="${xslt}"/>
    </html>

  • Problem transforming XML/XSL Using Xalan

    Hi, I am using the xalan apis to transform XML/XSL in a servlet..My servlet code is like...
    response.setContentType("text/html; charset=UTF-8");
    // Output goes in the response stream.
    PrintWriter out = response.getWriter();
    boolean environmentOK = (new org.apache.xalan.xslt.EnvironmentCheck()).checkEnvironment (out);
    try
    TransformerFactory tFactory = TransformerFactory.newInstance();
    // Get the XML input document and the stylesheet.
    Source xmlSource = new StreamSource("D:\\DATA\\jrun\\test\\test.xml");
    Source xslSource = new StreamSource("D:\\DATA\\jrun\\test\\test.xsl");
    // Generate the transformer.
    Transformer transformer = tFactory.newTransformer(xslSource);
    // Perform the transformation, sending the output to the response.
    transformer.transform(xmlSource, new StreamResult(out));
    I am getting the error ..
    javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXException: Namespace not supported by SAXParserjavax.xml.transform.TransformerConfigurationException
    That's why I have added the line..
    boolean environmentOK = (new org.apache.xalan.xslt.EnvironmentCheck()).checkEnvironment (out);
    But that gives me the following error diagnostic information...
    ERROR.version.DOM=ERROR attempting to load DOM level 2 class: java.lang.NoSuchMethodException
    I have put all the 3 required classes, xml-apis.jar, xercesImpl.jar and xalan.jar in my application servers classpath..
    Please let me know what I am doing wrong..and how this can be fixed.
    Thanks
    Surajit

    hey Surajit
    Your code is unable to create a transformer from a factory instance.
    I would check why it is not creating the Transformer.On my win32 system i usee two forward slashes..to identify the file path
    D://xyz//abc....instead of D:\\...i wonder if thats one reason why your code is not able to create a transformer based on the StreamSource u create for the file paths.
    Code i use..that works
    javax.xml.transform.TransformerFactory tFactory =
                                                                javax.xml.transform.TransformerFactory.newInstance();
                                                      javax.xml.transform.Source xmlSource = new javax.xml.transform.stream.StreamSource                              (xmlInputSource);
                                                 javax.xml.transform.Source xslSource = new javax.xml.transform.stream.StreamSource
                                       (xslInputSource);
                                                                                                        // Generate the transformer.
                                                                javax.xml.transform.Transformer transformer = tFactory.newTransformer(xslSource);
                                                                                                   // Perform the transformation, sending the output to the response.
                                                                transformer.transform(xmlSource,new javax.xml.transform.stream.StreamResult(out));
                                                                                                        I used jaxp-1.2 with tomcat 4.1.12
    Hope that helps.

  • Transforming XML/XSLT : CDATA problem

    Hi!
    I have a problem transforming xml with XSLT using the API javax.xml.
    The result is correct until I have a CDATA section in my xml document.
    The transforming process encodes all the & < > (special characters) it finds in.
    This occurs problem for the follow of my treatement because the content of my CDATA is already encoded.
    For example, this xml code :
    <?xml version='1.0' encoding="ISO-8859-1" ?>
    <article>
    <article-contenu><![CDATA[Accent : &eacute; Signe : &lt;]]></article-contenu>
    </article>
    produces in my output :
    Accent : &amp;eacute; Signe : &amp;lt;
    This is my java code :
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Source xmlSource = new StreamSource(readerXml);
    Source xslSource = new StreamSource( fileXsl );
    // Generate the transformer.
    Transformer transformer = tFactory.newTransformer(xslSource);
    // Perform the transformation, sending the output to the response.
    transformer.transform(xmlSource, new javax.xml.transform.stream.StreamResult(sw));
    How can I tell the transformer not to do that?
    Thanks for your answers!

    I am having a similar problem. I have enclosed my text data in my xml file like this:
    <![CDATA[<b>Hello World!</b>]]>
    My select statement in my XSLT sheet is as follows:
    <xsl:value-of select="." disable-output-escaping="yes"/>
    I have tried setting xsl:output to text, to html, and to xml. The <, >, and & get converted to xhtml entities.
    Where should I begin to troubleshoot? If the Xalan xslt jars? My stylesheet. My xml doc? Java code?
    Any feedback welcome.

  • Formatting dates in xsl transformation

    Hi:
    We have a problem transforming dates inside an xls mapping. Date and Time come from different fields in DDBB, so the straight way should be extract year, month and day from date, hour from time, concat everything together and finally push that string to format-DateTime. Well, that works except when hour is lower than 10, format-dateTime does not write a leading 0 (does not convert from '1' to '01'). We have tried everything, and found that using ora:formatDate works well when used in an Assign activity, but we cannot use that function inside the xls mapping we need. This is an example line:
    <xsl:value-of select="ora:formatDate('2001-01-01T1:00:00.000+01:00','yyyy-MM-dd HH:mm:ss')"/>
    BPEL message is "Invalid XPath expression"
    Does anybody know what are we doing wrong? This is driving me creasy..

    format that ora:formatDate uses is at http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
    it is normal that you get "Invalid XPath expression" this is not a XLST function; user dateTime(date, time) instead. for futhermore info check it out at http://www.w3.org/TR/xpath-functions/#durations-dates-times

  • Glassfish Web Service XSLT Transformation Not Working

    Hi,
    I've got a problem transforming an incoming soap request from a Microsoft Web Services Toolkit client. Basically, I've got a JAX-WS web service deployed to Glassfish v2 b33 which works fine when called by a Java client, but when called from the MS web services toolkit, some extra namespace elements are added to the SOAP request which the JAX-WS service doesn't seem to like. The incoming soap request looks like: <SOAP-ENV:Envelope
         xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
         xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
         xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/">
         <SOAP-ENV:Header/>
         <SOAP-ENV:Body>
               <SOAPSDK4:getConfig xmlns:SOAPSDK4="http://ws.firestorm.alternativenetworks.com/">
              <SOAPSDK4:arg0>Inbound</SOAPSDK4:arg0>
         </SOAPSDK4:getConfig>
         </SOAP-ENV:Body>
    </SOAP-ENV:Envelope> The problem lies with <SOAPSDK4:arg0>Inbound</SOAPSDK4:arg0>, in that the inclusion of SOAPSDK4 for any arguments (i.e. arg0, arg1) results in the values for the arguments reaching the web service as null. I've tested sending the SOAP request with a tcpmon utility, and the same soap request (as above) without the SOAPSDK4 in the arg0 element (i.e. <arg0>Inbound</arg0>) works fine.
    So I tried using the Transformation feature of glassfish, transforming the incoming SOAP request using the following XSLT file which I have tested and am sure works (I'm no XSLT guru so this will definitely need some tidying up): <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet  version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
         xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
         xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
         xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/">
         <xsl:output method="xml" indent="yes"/>
         <xsl:template match="*">
              <xsl:copy><xsl:copy-of select="@*"/><xsl:apply-templates/></xsl:copy>
         </xsl:template>
         <xsl:template match="/SOAP-ENV:Envelope/SOAP-ENV:Body/*">
              <xsl:copy>
                   <xsl:copy-of select="@*"/>
                   <xsl:for-each select="*">
                        <xsl:text disable-output-escaping="yes"><arg></xsl:text>
                        <xsl:value-of select="position() - 1"/>
                        <xsl:text disable-output-escaping="yes">></xsl:text>
                        <xsl:value-of select="."/>
                        <xsl:text disable-output-escaping="yes"></arg></xsl:text>
                        <xsl:value-of select="position() - 1"/>
                        <xsl:text disable-output-escaping="yes">></xsl:text>
                   </xsl:for-each>
              </xsl:copy>
         </xsl:template>
    </xsl:stylesheet>I load the .xsl file using the Transformation utility which seems to work fine, but when a request comes in from the MS client I get the following error: [#|2007-05-11T09:23:46.530+0100|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=15;_ThreadName=Thread-15;com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent -- server [1 Change(s), Id:1, ts:1178871826530];|ADM1041:Sent the event to instance:[com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent -- server [1 Change(s), Id:1, ts:1178871826530]]|#]
    [#|2007-05-11T09:27:31.675+0100|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=12;_ThreadName=httpWorkerThread-4848-0;com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent -- server [1 Change(s), Id:2, ts:1178872051675];|ADM1041:Sent the event to instance:[com.sun.enterprise.admin.event.wsmgmt.TransformationRuleEvent -- server [1 Change(s), Id:2, ts:1178872051675]]|#]
    [#|2007-05-11T09:28:00.269+0100|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=13;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=89eadb09-2894-4ace-95f6-75043c1e6988;|
    ERROR:  ''|#]
    [#|2007-05-11T09:28:00.285+0100|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=13;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=89eadb09-2894-4ace-95f6-75043c1e6988;|
    com.sun.enterprise.admin.wsmgmt.transform.TransformException: javax.xml.transform.TransformerException: java.lang.NullPointerException
         at com.sun.enterprise.admin.wsmgmt.transform.FilterChain.process(FilterChain.java:238)
         at com.sun.enterprise.admin.wsmgmt.transform.TransformFilter.process(TransformFilter.java:144)
         at com.sun.enterprise.admin.wsmgmt.filter.spi.FilterRouter.applyFilters(FilterRouter.java:69)
         at com.sun.enterprise.admin.wsmgmt.agent.GlobalMessageListenerImpl.processRequest(GlobalMessageListenerImpl.java:181)
         at com.sun.enterprise.webservice.monitoring.WebServiceEngineImpl.processRequest(WebServiceEngineImpl.java:265)
         at com.sun.enterprise.webservice.monitoring.JAXWSEndpointImpl.processRequest(JAXWSEndpointImpl.java:53)
         at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:127)
         at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:79)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
         at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:70)
         at com.sun.xml.ws.mex.server.MetadataServerPipe.process(MetadataServerPipe.java:97)
         at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:191)
         at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:113)
         at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:79)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
         at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:208)
         at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:374)
         at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:175)
         at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)
         at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:100)
         at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:74)
         at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:187)
         at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:116)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:101)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:74)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:207)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:249)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:248)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:199)
         at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:328)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
         at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)
    Caused by: javax.xml.transform.TransformerException: java.lang.NullPointerException
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:651)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:281)
         at com.sun.enterprise.admin.wsmgmt.transform.FilterChain.process(FilterChain.java:224)
         ... 54 more
    Caused by: java.lang.NullPointerException
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1235)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TrAXFilter.parse(TrAXFilter.java:105)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:588)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:642)
         ... 56 more Could this be a bug in Glassfish or am I overlooking something or doing things completely wrong?
    Cheers.

    How are you passing the input to XSLT?
    If your input request is following:
    <cus:InputParameters xmlns:cus="http://www.tcs.com/Customer">
    <cus:customerID>2</cus:customerID>
    </cus:InputParameters>Then you should pass $body/cus:InputParameters as the Input document for bind input in Proxy Service.

  • XSLT Problem with soap namespace

    Hi there,
    I have a problem transforming an XML doc with soap elements, using XSLT (Xalan).
    Here's the input:
    <?xml version = "1.0" encoding = "ISO-8859-1"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://www.ean.nl">
      <testthis>123456</testthis>
    </soap:Envelope>and here's the XSL:
    <?xml version="1.0"?>
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" exclude-result-prefixes="soap">
    <xsl:output method="xml" indent="yes"/>
    <xsl:template match="soap:Envelope">
    <Orders>
         <H01>
              <xsl:value-of select="testthis"/>
         </H01>
    </Orders>
    </xsl:template>
    </xsl:transform>I expect to get something like:
    <?xml version="1.0" encoding="UTF-8"?>
    <Orders>
    <H01>123456<H01>
    <Orders>But instead I get:
    <?xml version="1.0" encoding="UTF-8"?>
    <Orders>
    <H01/>
    </Orders>I've tried a lot of things and I'm probably overseeing something stupid, but I'm stuck.
    It seems as if anything without soap: namespace cannot be processed by my XSL (when I add it in the input XML and XSL it works).
    Any help would be greatly appreciated.
    Greetings,
    Erik

    Yes, I found it!
    The following XSL for the same XML doc works!
    <?xml version="1.0"?>
    <xsl:transform xmlns:ean="http://www.ean.nl" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" exclude-result-prefixes="soap">
    <xsl:output method="xml" indent="yes"/>
    <xsl:template match="soap:Envelope">
    <Orders>
         <H01>
              <xsl:value-of select="ean:testthis"/>
         </H01>
    </Orders>
    </xsl:template>
    </xsl:transform>Thanks, you pointed me in the right direction :-)
    Erik

  • Richtext refreshing problem

    Hi all,
    (working with flash builder 4.5)
    I have a function in my air-application which catches the event when a file is selected from the filesystem. I have to transform the file which takes a few minutes. No problem transforming, but I would like a simple richtext to display a 'log' to let the user know what is happening.
    The problem is: While the function is being executed the richtextfield isn't updated or refreshed. Only at the end you will see the text changes. This way the user doesn't get any information while processing.
    Somehow it seems that the whole function must be executed first before the application get refreshed.
    I tried to work with richTxt.valideNow() and richTxt.validateDisplayList(); but I didn't succeed.
    private function _convertFile(event:Event):void {
         richTxt.text = "reading File";
         step1_readFile(_selectedFile);
         richTxt.text = "transforming file";
         step2_transformFile(_selectedFile);
         richTxt.text = "search/replace in file";
         step3_searchReplace(_selectedFile);
         richTxt.text = "file converted";
    Any suggestions or solution?
    Thanks,
    Glen

    See psuedothreading post on my blog
    Alex Harui
    Flex SDK Team
    Adobe System, Inc.
    http://blogs.adobe.com/aharui

Maybe you are looking for

  • 'stopped' status when opening pdf in Firefox

    We're having problems opening the pdf's on our site in Firefox with Adobe Reader.  More than 50% of the time the pdf will not open and the status bar shows 'stopped'.  It's intermittent, the same file can fail to load 3 times but work on the fourth a

  • Can't Drag from iTunes into Garageband anymore

    After routine software update to iTunes 10 and Garageband 09 version 5.1,  I can no longer drag files from iTunes into Garageband, whereas I always could before. Whats wrong?  I'm using an iMac with a 3.06 GHz Intel Core 2 Duo Processor with 4 GB 106

  • No display in Boot Camp XP

    Hello, I own a unibody 15" MacBook Pro (2009 model) and have a boot camp partition running Windows XP. Yesterday while visiting a friend's office, I had the opportunity to hook my macbook up to an lcd monitor via a mini-display to vga adaptor, a firs

  • I am getting the message error when trying to run the labwindowa/CVI adapters for debug

    See attachments for error message and teststand settings. I am running testand 4.0.1 It was working before and suddenly it crash and then I am getting that error message every time Regards Attachments: ErrorLoadCallback.jpg ‏32 KB ErrorLoadCallback2.

  • Passing variables from PHP to AS3

    I am trying to get variables retrieved from a MySQL database by a PHP script into my ActionScript 3.0. script. To test I have created a simple instance of dynamic text called date_txt, and put the AS3 code below into the actions layer: All I want to