Invalid Error "Matching tag not found"
JETT - Java Excel Template Translator
Status: Beta
Brought to you by:
rgettman
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) ...
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 nestedjt: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
to
OK thanks