> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# Function: normalizeLynxXmlArtifact()

> **normalizeLynxXmlArtifact**(`value`: `string`): `string`

提取并规范化 Lynx XML 产物，校验其文档级约定。

要求 Lynx 根元素带有引擎版本且已闭合，恰好包含一个闭合的主线程脚本，
并且不含 CDATA 区块。此函数不会执行代码，也不会校验 JavaScript、CSS、
Element PAPI 语义或渲染结果。校验最终产物前，请先编译 Template 或
ScriptReuse 中间文档。

## Parameters

| Parameter | Type     |
| --------- | -------- |
| `value`   | `string` |

## Returns

`string`

## Throws

文档不符合文档级约定时抛出 Error。

## Example

```ts
const source = normalizeLynxXmlArtifact(modelResponse);
// Pass the normalized source to the renderer.
```
