Genereting JSTL tags with an XSLT transformation question

Hi there!
I have some XML datas to display in a jsp file.
XML content is of this type:
<message>
<title>A message</title>
</message>
The most elegent way to present them is to transform XML via xslt into xhtml.
(that way I can externally change with ease the message formatting output without changing the jsp)
For that, I use the cool tag
<x:transform>
on each xml file i want to display (with x:foreEach)
The output produced for each xml file is:
<div class="message">
<h2>A message</h2>
</div>
My problem is now that I want to include custom tags in the generated content!
For exemple:
<div class="message">
<h2>A message<c:out ...></h2>
</div>
My question is:
how can I make that xslt generated tag to be executed???
Since it is the product of an xslt transformation ,I suppose it won't be executed at all...
Advices greatly appreciated! :)

I'm not sure I understand what you mean when you say "how can I make that xslt generated tag to be executed???"
You've got your XML input and the XSL-T stylesheet that will transform the XML input into an XHTML stream containing JSTL tags.
I'm assuming that you're going to ask a servlet to pass the XML input to the XSL transformer and get the XHTML output stream. Once you have that, the servlet will write the XHTML to the HTTP response output stream, where it'll be rendered by the browser.
I think the key is to make sure that you tell the browser that response type is a JSP (that's the only document type in which it makes sense to put JSTL tags). When the browser gets that JSP, it'll treat it like any other: generate .java code, compile that to a .class file, and then render.
I'm not sure about efficiency, but it sure is an elegant solution. - MOD

Similar Messages

  • XSLT Transformation Question

    Hi together!
    Hope anybody can help.
    I have the follow XML structure :
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">¶
    <asx:values>¶
    <IMPORT>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>222358   1NU    480350    29102007VENDA DE MERCADORIA        30</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>35403474</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>35403822</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>4480350</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>220089</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>3540347</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>4480351 </DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    </IMPORT>¶
    </asx:values>¶
    </asx:abap>
    After the XSLT Transformation i need the data in this structure :
    <data>
         <invoice>
               <id>222358</id>
               <item>35403474</item>
               <item>35403822</item>
               <code>4480350</code>
         </invoice>
         <invoice>
               <id>220089</id>
               <item>35403474</item>
               <code>4480351</code>
         </invoice>
    </data>
    I tried to group the data with the tag "xsl:for-each-group". But i get no result.
    Regards,
    Anton

    Hi,
    no one with a good hint?
    Regards,
    Anton

  • FM12 console appears with every XSLT transform

    Hi,
    FM12.0.0.329, Win7
    This question has been asked in various permutations with little successs, but let me try again. I need to find a way to disable the Console panel, which pops up every time I open an XML document with a message similar to the following:
    XML Read Report Log
    Source Document: C:\documentation_test\common\modules\test_ipeth_ping.xml
    XSLT Processor Messages
    Transformation Successful.
    Everything worked fine but I still get this message with every document. Can I make it stop? If anyone from Adobe is reading, I want to say with some emphasis that this situation makes FM12 unworkable for me. I can't justify migration from FM11 if there is no way to stop this intrusion.
    Thanks,
    Russ

    Hi,
    FM12.0.0.329, Win7
    This question has been asked in various permutations with little successs, but let me try again. I need to find a way to disable the Console panel, which pops up every time I open an XML document with a message similar to the following:
    XML Read Report Log
    Source Document: C:\documentation_test\common\modules\test_ipeth_ping.xml
    XSLT Processor Messages
    Transformation Successful.
    Everything worked fine but I still get this message with every document. Can I make it stop? If anyone from Adobe is reading, I want to say with some emphasis that this situation makes FM12 unworkable for me. I can't justify migration from FM11 if there is no way to stop this intrusion.
    Thanks,
    Russ

  • Need Suggestion on including JSTL Tags with JSF

    Hi..All....
    I need some suggestions.. i Started doing a project in JSF.. i am new to JSF...
    I Developed some part of the project in Struts.. but now.. our clinet says... The Application Has to go
    with JSF.so.. started redesigning again....
    Can i use JSTL...where ever i want....when i am developing a JSF Application...
    Please suggest..me...
    Thanks.. for the Help..
    Arthi

    I am freely mixing jstl and jsf in my project using:
    JSTL RI 1.2
    JSF RI 1.2
    Tomcat 6
    i am mixing c:forEach and h: tags successfully, which i needed for some javascript functionality that i could not do with data table. but stick to JSF wherever possible!

  • Can I use c:out JSTL tag with int values?

    I am attempting to c:out an int variable in my JSP using a JSTL core tag. First is it possible to do c:out an int? Second, if it is...can anyone see anything wrong with my code?
    This is the error log I am getting:
    <Oct 7, 2008 10:20:29 AM MDT> <Error> <HTTP> <BEA-101017> <[ServletContext(id=20
    462449,name=rconnect,context-path=/rconnect)] Root cause of ServletException.
    javax.servlet.jsp.JspException: ServletException in '/WEB-INF/pages/signup/summa
    ry.jsp': An error occurred while evaluating custom action attribute "value" with
    value "${orderForm.numOtaModulesSelected}": Unable to find a value for "numOtaM
    odulesSelected" in object of class "com.echostar.rconnect.struts.formbeans.Order
    FormBean" using operator "." (null)
    This is the code:
    <c:out value="${orderForm.numOtaModulesSelected}" />where numOtaModulesSelected is defined as a private member variable of the OrderFormBean
    I have included the taglib.
    Thanks to anyone who can help

    Your OrderFormBean class needs to implement a getNumOtaModulesSelected method for that to work. The expression language won't let you get at fields, you need to access it via JavaBeans properties.

  • Oracle XSLT Transformation not preserving space in text element

    If we have a BPEL process which is calling a XSLT transformation contains the code similar as below:
    for Populating an element with white space only
    <tns:TargetField>
    <xsl:text disable-output-escaping="yes"> </xsl:text> <!--Note the whitespace , also tried with disable-output-escaping =”no” -->
    </tns: TargetField>
    Our expected result / output would be:
    <tns:TargetField> </tns: TargetField> <!--Note the whitespace -->
    But, we get:
    <tns:TargetField/>
    Oracle XSLT is ignoring the white space even if we try with preserve space in XSD, or in XSLT this is not producing the expected output.
    This looks a BUG with Oracle XSLT Transformation .
    For a workaround solution we can use below XSLT snippet:
    *<tns:TargetField>*
    *<xsl:value-of select="string(' ')"/> <!--Note the whitespace -->*
    *</tns:TargetField>*
    This is returning Output:
    *<tns:TargetField> </tns:TargetField> <!--Note the whitespace -->*
    Any other work around do you find?
    Edited by: panks on Jul 29, 2011 12:37 PM

    The workaround only works with one white space, if one put more white spaces, it do not work.
    <tns:TargetField>
    <xsl:value-of select="string(' ')"/> <!--Note the whitespaces -->
    </tns:TargetField>
    This is returning Output:
    <tns:TargetField> </tns:TargetField> <!--Note the only one whitespace -->
    Edited by: user10697506 on Aug 10, 2011 3:27 PM

  • JSTL tags

    Where can I find the list of all JSTL tags with description about their functionality?..

    What, couldn't wait for a reply to your other post?
    Documentation can be found on this very website!
    http://java.sun.com/products/jsp/jstl/reference/api/index.html
    I would recommend you get hold of the Specification documents. They are very readable, and make an excellent reference. I constantly refer to them.
    On the above link,
    Maintenance Release = JSTL1.1
    Final Release = JSTL1.0
    If you are using JSTL1.1/JSP2.0, then the JSP2.0 specification is the source for all things related to the Expression Language (EL)
    http://java.sun.com/products/jsp/reference/api/index.html
    Cheers,
    evnafets

  • Transformer Tags with Sessions

    Hi All, this is a sort in the blue but always worth asking.
    I'm in the process of building a portlet (in Java) which contents to more than one instance of a portal set up. (ie a completly stand alone set up). Don't ask why we are doing this and not using sub portals as it's a lokk story.
    Anyway, my question is....... the gadget I'm building needs to retrieve details on all documents/folders held in each portal.
    I know I can create a session in each and query from there but the pt:tree transformer tage does exactly what I need. The problem is that this seems to only access the Portal I'm in. Does anyone know if this can be based upon a particular Session object?
    Thanks and good luck. Adam

    revDAVE wrote:
    Happy Holdays folks,,
    TAGS with various formats...
    I have some CD's to digitize. I am curious of the best way to do this...
    For me I am thinking that I will create 256 Stereo AAC files for IOS, but also then create .aif files to store for desktop players etc.
    RIP them as AIFF (or ALAC).
    For syncing to iDevice, just use the option to convert to 128, 192, 256 AAC when you sync them. No need to RIP them as 256 and have multiple copies of same song in different formats.

  • Tags not printed when outputting XML after XSLT transformation

    Hi!
    I want my to perform an XSLT transformation on requests to my web service.
    This is the style of a typical request:
    <app:aRequest xmlns:app="http://myNamespace">
      <app:firstTag>value1</app:firstTag>
      <app:secondTag>value2</app:secondTag>
      <app:thirdTag>value3</app:thirdTag>
    </app:aRequest>I want to transform it into something like this:
    <app:aRequest xmlns:app="http://myNamespace">
      <app:firstTag>A hard coded, completely different value!</app:firstTag>
      <app:secondTag>value2</app:secondTag>
      <app:thirdTag>value3</app:thirdTag>
    </app:aRequest>To do that, I use the following XSLT:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:app="http://myNamespace">
    <xsl:template match="/">
    <app:aRequest>
      <app:firstTag>A hard coded, completely different value!</app:firstTag>
      <app:secondTag><xsl:value-of select="app:aRequest/app:secondTag" /></app:secondTag>
      <app:thirdTag><xsl:value-of select="app:aRequest/app:thirdTag" /></app:thirdTag>
    </app:aRequest>
    </xsl:template>
    </xsl:stylesheet>And I use the following code to execute the transformation:
    public Object unmarshal(Source source) throws XmlMappingException, IOException {
      TransformerFactory factory = TransformerFactory.newInstance();
        // Does this factory support SAX features?
        if(factory.getFeature(SAXSource.FEATURE)) {
          SAXTransformerFactory saxTransformerFactory = (SAXTransformerFactory)factory;
        // Read xslt file.
        InputStream inputStream = getClass().getResourceAsStream("/META-INF/xsltTransformation.xsl");
        if(inputStream == null) {
          throw new RuntimeException("No XSLT transformation file present at " + location);
        Templates xsltOutputTemplate = saxTransformerFactory.newTemplates(new StreamSource(inputStream));
        Transformer transformer = xsltTemplate.newTransformer();
        // Perform transformation.
        StringWriter stringWriter = new StringWriter();
        StreamResult result = new StreamResult(stringWriter);
        transformer.transform(source, result);
        // Print result.
        String xmlString = stringWriter.toString();
        System.out.println(xmlString);
        // Proceed with unmarshalling.
        StringReader stringReader = new StringReader(xmlString);
        StreamSource transformedSource = new StreamSource(stringReader);
        return oxMapper.getUnmarshaller().unmarshal(transformedSource);
    }However, the System.out.println(xmlString); produces the following result:
    <?xml version="1.0" encoding="UTF-8"?>
      value1
      value2
      value3The tags are not printed and the hard coded value is not present.
    What am I doing wrong? Please help!

    Following up on what the good Dr said,
    Are you sure that you are using the stylesheet that you think you are?
    I tried your stylesheet and input and got more or less what you wanted and not what you actually got.
    Note that I did not use your code.

  • Issue with xslt transform

    I'm having a problem with xslt transformations.
    I'm sending a DOMDocument to be transformed into a varchar2. The transformation was into html and I was then printing the returning varchar2 to a web page, along the lines of...
    htp.prn(Xslt.transform(domdoc, xslt.stylesheet( l_stylesheet_bfile)));
    I subsequently broke the varchar2 32k limit so I started playing with transforming into a dom instead of a varchar, then writing the dom to a clob and the printing the clob to the web page in 32k chunks.
    I noticed this produced different results than the first method. Now I'm assuming that this is not because xslt is doing the transformations differently but because it's trying to put my html into a well-formed DOMdocument. I have noticed, though, that things like & #160; seemed to have disappeared.
    Just wondering if I'm doing something wrong, and also any reason why the transform functionality doesn't have an output option of CLOB?
    Thanks
    Jason

    What is the DB version?

  • Problem with XSLT Transformation on BPM

    Hi there,
    I have a 1:N File --> Idocs Scenario with BPM, Inside the BPM i have an XSLT Transformation that has a problem i cant figure out, basically this XSLT Groups the file structure like this:
    <File>                                                *                  <Shipments>
       <Route>                                         *                     <Route>
          <Id>1</Id>                                   *                         <Id>1</Id>
          <delivery>1</delivery>               *                         <delivery>1</delivery>
       </Route>                                        *                         <delivery>2</delivery>
      <Route>                                          *                     </Route>
          <Id>1</Id>                                   *                     <Route>
          <delivery>2</delivery>               *                         <Id>2</Id>
       </Route>                                        *                         <delivery>3</delivery>
      <Route>                                          *                         <delivery>4</delivery>
          <Id>2</Id>                                   *                      </Route>
          <delivery>3</delivery>               *                   </Shipments>
       </Route>                                        *
       <Route>                                         *
          <Id>2</Id>                                   *
          <delivery>4</delivery>               *
       </Route>                                        *
    </File>                                               *
    It's supposed to generate 1 Route Segment for each disctint Route Id on the Source file, it has always worked fine as we ran several tests before going into production system, but now, sometimes it misses a few routes for example the output will be 25 different Routes for a source file that 28, or 2 routes from a file that as 3.
    I have tested the XSLT on the repository and it works fine all the time, same thing when using xml spy, i always download the payload i get from the file adapter, i got a source file from PRD that has 28 routes and i ran the whole scenario on QAS and it generated 12 routes only, im about to open an OSS message but first i wanted to know if anyone has seen something like this, thanks in advance for all the help you guys can provide.
    Best Regards,
    Roberto.
    p.s. i can send the XSL if needed or anything just ask for it.

    Hi,
    Basically because i  have to do 2 transformations, first i run the XSLT to group all the deliveries and such, and then i do a graphic mapping to split it into single Shipment Idocs, i dont know how to group by id on graphical mapping..., anyway i don't think the fact that im using BPM would finally alter the xslt result,
    Regards,
    Roberto.

  • Problem using JSTL tag libraries with OC4J 9.0.3

    Hi
    I'm using the JSTL tag libraries with OC4J 9.0.3. I'm using JDeveloper10.1.2. I put the fmt.tld and c.tld in the WEB-INF directory and I'm adding the jstl.jar and standard.jar library to the EAR file. Both tlds have:
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    And OC4J 9.0.3 is compatible with tlib version 1.0 and jsp version 1.2. When I run the web app I get:
    OracleJSP: oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt"%>
    Error: oracle.xml.parser.v2.XMLParseException ( /dataSource.jsp ):
    line #:1 column #:48 : FIXED type Attribute value not equal to the default value 'http://java.sun.com/xml/ns/j2ee'.
    line #:2 column #:18 : Attribute 'xmlns:xsi' used but not declared.
    line #:3 column #:19 : Attribute 'xmlns:acme' used but not declared.
    line #:4 column #:27 : Attribute 'xsi:schemaLocation' used but not declared.
    line #:7 column #:16 : Attribute 'version' used but not declared.
    line #:14 column #:15 : Invalid element 'tag-class' in content of 'tag', expected elements '[tagclass]'.
    line #:14 column #:15 : Element 'tag-class' used but not declared.
    line #:15 column #:18 : Invalid element 'body-content' in content of 'tag', expected elements '[tagclass]'.
    line #:15 column #:18 : Element 'body-content' used but not declared.
    line #:16 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:18 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:18 column #:12 : Element 'type' used but not declared.
    line #:22 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:24 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:24 column #:12 : Element 'type' used but not declared.
    line #:28 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:30 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:30 column #:12 : Element 'type' used but not declared.
    line #:34 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:36 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    Any ideas?

    Hi
    Thanks for the reply.
    I tried it and I get the same error:
    OracleJSP: oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
    Error: oracle.xml.parser.v2.XMLParseException ( /dataSource.jsp ):
    line #:1 column #:48 : FIXED type Attribute value not equal to the default value 'http://java.sun.com/xml/ns/j2ee'.
    line #:2 column #:18 : Attribute 'xmlns:xsi' used but not declared.
    line #:3 column #:19 : Attribute 'xmlns:acme' used but not declared.
    line #:4 column #:27 : Attribute 'xsi:schemaLocation' used but not declared.
    line #:7 column #:16 : Attribute 'version' used but not declared.
    line #:14 column #:15 : Invalid element 'tag-class' in content of 'tag', expected elements '[tagclass]'.
    line #:14 column #:15 : Element 'tag-class' used but not declared.
    line #:15 column #:18 : Invalid element 'body-content' in content of 'tag', expected elements '[tagclass]'.
    line #:15 column #:18 : Element 'body-content' used but not declared.
    line #:16 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:18 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:18 column #:12 : Element 'type' used but not declared.
    line #:22 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:24 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:24 column #:12 : Element 'type' used but not declared.
    line #:28 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:30 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:30 column #:12 : Element 'type' used but not declared.
    line #:34 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:36 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.

  • Can XSLT transformation created with XSLT_TOOL be called from outside?

    Hello,
    I have created an XSLT transformation with the transaction XSLT_TOOL in the ECC 6.0 system.
    I got a request if this XSLT transformation can be called from outside SAP, example Informatica Power Center. ( http://www.informatica.com/PRODUCTS_SERVICES/POWERCENTER/Pages/index.aspx )
    Can these XSLT be called from outside?
    thank you
    Koen Van Loocke

    Hi,
    I don't think you can call the XSLT_TOOL from outside but what you can do is create a transformation and write a function that serves as a wrapper. You can call the function from outside (RFC) and the function could invoke an existing transformation.
    Cheers

  • Help with JSP and JSTL tag

    I am trying to accomplish the following
    -display a checkbox if the phrase "platinum" appears in a string
    -display a radio button otherwise
    Here is my code:
    <c:when test="${fn:containsEqualIgnoreCase(${product.description}, 'platinum' })}">
                      <td width="40">
                       </td>
                     <td width="1">
                        <html-el:checkbox property="dishHDProduct"             value="${product.productId}:${product.presentationChannelText}:${product.programmingType}" disabled="true"/>                                                            
                                                                  </td>
                                                             </c:when>
                                                             <c:otherwise test="${fn:containsEqualIgnoreCase("platinum")}">
                                                                  <td width="1">
                                                                       <html-el:radio property="dishHDProduct" value="${product.productId}:${product.presentationChannelText}:${product.programmingType}"/>                                                            
                                                                  </td>
                                                             </c:otherwise>I suspect that I cannot use the <when> <otherwise> stuff with the function JSTL tag, but I may be wrong. I am new to this and open to all suggestions.
    Thanks!

    This is actually the way I ended up solving my own problem:
    <c:choose>
                                                             <c:when test="${product.presentationChannelText == 'PlatinumHD'}">
                                                                  <td width="10">
                                                                  </td>
                                                                  <td width="1">
                                                                       <html-el:checkbox property="dishHDProduct" value="${product.productId}:${product.presentationChannelText}:${product.programmingType}" disabled="true"/>                                                            
                                                                  </td>
                                                             </c:when>
                                                             <c:otherwise>
                                                                  <td width="1">
                                                                       <html-el:radio property="dishHDProduct" value="${product.productId}:${product.presentationChannelText}:${product.programmingType}"/>                                                            
                                                                  </td>
                                                             </c:otherwise>
                                                        </c:choose>Because I am not able to use JSP 2.0 and therefore must use JSTL 1.0

  • JSP Compilation Problems With JSTL tags

    My JSP worked well when I used JSP expressions, scriptlets, .... I tried to use JSTL instead and encountered some compilation problems. I am unable to see my mistakes and need help:
    Problme #1:
    int offset = 0;
    try
       <c:set var="offset" value="${requestScope.offset}" />
    catch ( Exception e )
        // do nothing
    }The above code has two compilation errors:
    Generated servlet error:
    [javac] Compiling 1 source file
    illegal start of expression
    <c:set var="offset" value="${requestScope.offset}" />
    ^
    Generated servlet error:
    ';' expected
    <c:set var="offset" value="${requestScope.offset}" />
    ^
    Problem #2:
    <c:set var="threadBean" value="${requestScope.ThreadBean}" />
    int threadID_int = ParamUtil.getParameterInt( request, "thread" );
    <c:if test="${threadBean.threadID} != threadID_int">
        throw new AssertionException( "The two threadID are not the same." );
    </c:if>Generated servlet error:
    illegal start of expression
    <c:if test="${threadBean.threadID != threadID_int}">
    ^

    I have deleted the Java code around the JSTL tags. Now, what is wrong with this <c:if test=" ... "> tag? It seems that I have problems to get JSTL tags right.
    It seems that I have problems to get JSTL tags right....
    <c:if test="${attachBean.attachMimeType.startsWith('image/')}">
         <html:img page="getattachment?attach=<c:out value='${attachBean.attachID}' />" alt="<c:out value='${attachBean.attachFilename}' />" title="<c:out value='${attachBean.attachFilename}' />" border="0" />
    </c:if>error message:
    74: tag = 'if' / attribute = 'test': An error occurred while parsing custom action attribute "test" with value "${attachBean.attachMimeType.startsWith('image/')}": Encountered "(", expected one of ["}", ".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=", "ne", "[", "+", "-", "*", "/", "div", "%", "mod", "and", "&&", "or", "||"]

Maybe you are looking for