使用 PptxGenJS 和 Python 解析,将结构化的 HTML/CSS 幻灯片内容转换为原生、可编辑的 PowerPoint(.pptx)演示文稿。
唯一合规写法是itemtype="https://schema.org/person"等https无尾斜杠绝对url;itemscope与itemtype必须同元素;嵌套实体需独立itemscope;itemprop名称须严格匹配对应itemtype的schema定义。

itemtype URL 格式错:协议、大小写、斜杠全得对
Google Rich Results Test 报“No structured data detected”,90% 是 itemtype 写错了 URL。它不是“差不多就行”的字符串,而是必须严格匹配的 HTTPS 绝对地址。
-
itemtype="http://schema.org/Person"—— 2026 年起已完全失效(HTTP 协议被拒收) -
itemtype="https://schema.org/person"—— 小写person被解析器拒绝(大小写敏感) -
itemtype="https://schema.org/Person/"—— 末尾斜杠导致静默丢弃(必须无尾斜杠) -
itemtype="Person"或itemtype="./schema.json"—— 缩写或本地路径,一律无效
✅ 唯一合规写法:itemtype="https://schema.org/Person"、itemtype="https://schema.org/Restaurant"。验证方式:复制该 URL 到浏览器,应返回 200 页面(哪怕只是 HTML)。
itemscope 和 itemtype 没写在同一元素上
这是硬性语法要求,不是风格建议。分离写法等于没写,整个微数据块会被跳过。
- ❌ 错误:
<div itemscope><section itemtype="https://schema.org/Book"></section></div>——itemtype没绑定到itemscope所在节点,解析器找不到作用域起点 - ✅ 正确:
<section itemscope itemtype="https://schema.org/Book"></section> - ⚠️ 不要在
<time></time>、<p></p>等非容器语义标签上单独加itemtype(HTML 规范不允许) - ✅ 推荐复用语义标签作容器,比如
<article itemscope itemtype="https://schema.org/Article"></article>,比套<div> 更干净且利于 SEO <h3>嵌套结构漏掉内层 itemscope</h3> <p>当 <code>itemprop指向另一个实体(如author、address、review),它本身必须是一个独立作用域,不能靠父级“继承”类型。- ❌ 典型错误:
<div itemscope itemtype="https://schema.org/Article"><p itemprop="author">张三</p></div>——itemprop="author"没绑定任何itemscope,Google 直接忽略作者信息 - ✅ 正确嵌套:
<p itemprop="author" itemscope itemtype="https://schema.org/Person">张三</p> - ✅ 对于地址:
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">,且内部必须含 <code>streetAddress、addressLocality等子属性 - ⚠️ 嵌套层级越深,越容易漏掉某一层的
itemscope;每层itemprop指向新实体,就必须配一层新的itemscope itemtype - ❌
itemtype="https://schema.org/Event"却写itemprop="telephone"——telephone属于Organization或Person,Event 类型根本不定义它 - ❌
itemtype="https://schema.org/Article"却写itemprop="price"——price是Offer的属性 - ✅ 查证方式:打开对应 Schema 页面(如
https://schema.org/Event),只使用「Properties」列表里明确列出的itemprop名称 - ⚠️ 属性名区分大小写:
itemprop="address"有效,itemprop="Address"无效
itemprop 名称与 itemtype 类型不匹配
itemtype不是摆设,它锁定了当前作用域能合法使用的itemprop名称。填错就静默丢弃。最隐蔽的问题往往出在嵌套层级和类型对齐上——哪怕 URL 和语法全对,只要
itemprop和itemtype不在同一个 Schema 定义范围内,整段结构化数据就形同虚设。 - ❌ 典型错误:










