HTML Embedded Content
The HTML 4 and HTML 5 file types can treat scripts inside HTML as embedded content (content that can be processed separately by an embedded content processor). You can choose what content processors to use for the embedded content.
- client-side scripts: these are embedded into the HTML file served to the client (e.g. a web browser) by the server, usually enclosed inside a <script> tag. Client-side scripts remain in the HTML source and may be executed by the client itself.
- server-side scripts: these are pre-processed by the server before sending the final HTML page to the client (e.g. a web browser). Once served through the Web to the client, server-side scripts will no longer exist in the HTML source, but instead are replaced by their computed result.
Use the options on the Embedded Content page of your HTML file type to configure where Studio looks for embedded content in the XML file and what processor it uses to handle this embedded content.
To display the Embedded Content page:
- Click if you want to make changes to the global Studio settings or to change the active project only.
- Expand the HTML 4 or HTML 5 file type and select the Embedded Content page.
If you do not enable embedded content processing, Studio ignores the content embedded in an HTML file.
- Check the Enable <script> element processing option.
- Choose one of the embedded content processors from the drop-down list. By default, this list contains the three predefined embedded content processors available for HTML file types: Plain Text, HTML 4 and HTML 5. You can add additional embedded content processors to this list by creating a new embedded content processor.
- Go to the Parser page of the HTML file type and make sure the <script> tag is set as translatable and it has the Structure tag type set.
- Check the Enable embedded server side scripts processing option.
- Choose one of the embedded content processors from the drop-down list.
To configure how your selected embedded content processor extracts and displays content embedded in the *.html file, see the help topics under the Embedded Content Processors section.