【问题标题】:syntax for attribute type of an img src file in DTDDTD 中 img src 文件属性类型的语法
【发布时间】:2018-10-02 19:02:20
【问题描述】:

当我验证我的 DTD 文件时,我收到此错误 --> 必须为元素类型 profile 声明属性 type。 我应该如何编辑我的 DTD 文件以消除此错误?

外部DTD

!ELEMENT profile ANY

XML 文件

<profile type="jpeg">C:\Users\username\Desktop\image3.jpg</profile>

XSL 文件

<td rowspan="6" align="left" style="color:#C0C0C0;"> <img src="{profile}" />

我必须删除标签才能在 Stack Overflow 上显示。

【问题讨论】:

    标签: html css xml xslt dtd


    【解决方案1】:

    在 DTD 中声明属性为:

    <!ELEMENT  profile       (#PCDATA)*                 >
    <!ATTLIST  profile
                 type        CDATA            #IMPLIED  >
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-12-06
      • 1970-01-01
      • 1970-01-01
      • 2017-12-13
      • 1970-01-01
      • 2021-12-20
      • 1970-01-01
      • 2014-09-09
      相关资源
      最近更新 更多