Menu

#80 Invalid Error "Matching tag not found"

1.0
closed
nobody
None
2018-05-31
2017-02-23
SuperPat
No

Hi,

With JETT 0.9.1, I have an XLS template with 3 <jt:foreach> tags imbricated but JETT sems to need a fourth </jtforeach> end tag.

Without, I have this exception:

net.sf.jett.exception.TagParseException: Matching tag not found for tag: <jt:forEach items="${Chrono}" var="C">, located at Chronologie générale!A3, within block Block: left=0, right=9, top=0, bottom=11, direction=NONE
    at net.sf.jett.transform.CellTransformer.transformCellTag(CellTransformer.java:266)
    at net.sf.jett.transform.CellTransformer.transform(CellTransformer.java:124)
    at net.sf.jett.transform.BlockTransformer.transform(BlockTransformer.java:72)
    at net.sf.jett.transform.BlockTransformer.transform(BlockTransformer.java:34)
    at net.sf.jett.transform.SheetTransformer.transform(SheetTransformer.java:148)
    at net.sf.jett.transform.SheetTransformer.transform(SheetTransformer.java:74)
    at net.sf.jett.transform.ExcelTransformer.transform(ExcelTransformer.java:416)
    at com.ontomantics.util.JETTUtil.process(JETTUtil.java:172)
    ...
1 Attachments

Discussion

  • Randy Gettman

    Randy Gettman - 2017-08-11

    SuperPat,

    This error occurs because nested tags must be completely within their parent tag. Your outermost jt:forEach tag starts at A3 and ends at B10, so all nested tags must start and end within that rectangle. However, your 3rd-level nested jt:forEach tag starts at A9 and ends at J9, and J9 is outside of the outermost tag. It's also outside of the 2nd-level tag, which starts at A5 and ends at A10.

    To expand the coverage of those tags, move your 2 outermost end tags, currently on A10 and B10, both to J10. Change

         A         B         C-I      J
    1
    2
    3  forEach1
    4
    5  forEach2
    6
    7
    8
    9  forEach3                     /forEach3
    10 /forEach2 /forEach1
    

    to

             A         B         C-I      J
    1
    2
    3  forEach1
    4
    5  forEach2
    6
    7
    8
    9  forEach3                     /forEach3
    10                              /forEach2/forEach1
    
     
  • SuperPat

    SuperPat - 2017-08-11

    OK thanks

     
  • Randy Gettman

    Randy Gettman - 2018-05-31
    • status: open --> closed
     

Log in to post a comment.