[ 
https://issues.apache.org/jira/browse/FREEMARKER-203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17463310#comment-17463310
 ] 

Dániel Dékány commented on FREEMARKER-203:
------------------------------------------

You are using some extra syntax there to embed FreeMarker tags into a document 
that's edited visually. You end up with XML tags between the #switch and the 
#case (if you look at document.xml inside the docx), which is not allowed by 
FreeMarker. Please consult the documentation or author of the tool that allows 
embedding FreeMarker into the visually edited docx. 

Please use English for further communication.

> Не работает switch-case
> -----------------------
>
>                 Key: FREEMARKER-203
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-203
>             Project: Apache Freemarker
>          Issue Type: Bug
>            Reporter: Виталий Кузнецов
>            Priority: Major
>         Attachments: image-2021-12-21-16-07-52-178.png, ошибка switch.docx
>
>
> при выполнении такой конструкции (см вложение)
> «[#switch approved.docType]»«[#case 
> "ACT"]»актом«[#break]»«[#default]»кк«[/#switch|#switch]»
> происходит ошибка:
> freemarker.core.ParseException: Syntax error in template 
> "61c1ce114fddff0007083245!word/document.xml" in line 1, column 282330:
> Encountered "<", but was expecting one of:
>     <CASE>
>     <COMMENT>
>     <TERSE_COMMENT>
>     <END_SWITCH>
>     <DEFAUL>
>     <STATIC_TEXT_WS>
>  
> Модель данных:
> "approved": \{"docType": "ACT"}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to