XHTML中的外部链接验证

时间:2016-04-07 22:20:50

标签: xhtml

我已经在another post of mine发布了这个问题,但是尽管回答了我发布的另一个问题,但没人回答。 我在“来源”中有外部链接。 XHTML过渡文档中的部分:

<p class="source">AARON. "Grandmasters of Flash: An Interview with the Creators of Flash | Cold Hard Flash: <br/>
            <span class="tab">Flash Animation News, Videos and Links." <i>Cold Hard Flash Flash Animation News</i> </span> <br/>
            <span class="tab"><i>Videos and Links RSS</i>. N.p., 12 Feb. 2008. Web.</span> <br/>
            <span class="tab">&lt;<a href="http://www.coldhardflash.com/2008/02/grandmasters-of-flash-an-interview-with-the-creators-of-flash.html" target="_blank">http://www.coldhardflash.com/2008/02/grandmasters-of-flash-an-interview-with-the-creators-of-flash.html</a>.&gt;</span>
        </p>

        <p class="source">Boulton, Jim. "Macromedia Flash Back." <i>Digital Archaeology</i>. WordPress, 05 Sept. 2012. Web. <br/>
            <span class="tab">&lt;<a href="http://digital-archaeology.org/flash-back/" target="_blank">http://digital-archaeology.org/flash-back/</a>.&gt;</span>
        </p>

        <p class="source">Clover, Juli. "Adobe Renaming 'Flash Professional' to 'Animate', Shifts Focus to HTML5." - <br/>
            <span class="tab"><i>Mac Rumors</i>. MacRumors, 01 Dec. 2015. Web.</span> <br/>
            <span class="tab">&lt;<a href="http://www.macrumors.com/2015/12/01/adobe-renames-flash-professional-to-animate/" target="_blank">http://www.macrumors.com/2015/12/01/adobe-renames-flash-professional-to-animate/</a>.&gt;</span>
        </p>

        <p class="source">Dalrymple, Jim. "Adobe, Macromedia Reach Agreement in Patent Lawsuit." <i>Macworld</i>. IDG  <br/>
            <span class="tab">Consumer &amp; SMB, 29 July 2002. Web.</span> <br/>
            <span class="tab">&lt;<a href="http://www.macworld.com/article/1008577/lawsuit.html" target="_blank">http://www.macworld.com/article/1008577/lawsuit.html</a>.&gt;</span>
        </p>

        <p class="source">Lardinois, Frederic. "Adobe Launches Animate CC, Previously Known As <br/>
            <span class="tab">Flash Professional." <i>TechCrunch</i>. AOL Inc., 08 Feb. 2016. Web.</span> <br/>
            <span class="tab">&lt;<a href="http://techcrunch.com/2016/02/08/adobe-launches-animate-cc-previously-known-as-flash-professional/" target="_blank">http://techcrunch.com/2016/02/08/adobe-launches-animate-cc-previously-known-as-flash-professional/</a>.&gt;</span>
        </p>

        <p class="source">Lee, Rich. "Welcome Adobe Animate CC, a New Era for Flash Professional." <i>Adobe Animate</i> <br/>
            <span class="tab"><i>Team Blog</i>. Adobe Systems Incorporated, 30 Nov. 2015. Web.</span> <br/>
            <span class="tab">&lt;<a href="http://blogs.adobe.com/animate/welcome-adobe-animate-cc-a-new-era-for-flash-professional/?sdid=JRSIQ&mv=search&s_kwcid=AL!3085!3!91748895283!e!!g!!flash%20professional&ef_id=Vut2uAAAAVolsjfr:20160318054023:ss" target="_blank">http://blogs.adobe.com/animate/welcome-adobe-animate-cc-a-new-era-for-flash-professional/?sdid=JRSIQ&mv=search&s_kwcid=AL!3085!3!91748895283!e!!g!!flash%20professional&ef_id=Vut2uAAAAVolsjfr:20160318054023:ss</a>.&gt;</span>
        </p>

        <p class="source">Rouse, Margaret. "ActonScript: What Is ActionScript? - Definition from <br/>
            <span class="tab">WhatIs.com." <i>SearchSOA</i>. TechTarget, Sept. 2005. Web.</span> <br/>
            <span class="tab">&lt;<a href="http://searchsoa.techtarget.com/definition/ActionScript" target="_blank">http://searchsoa.techtarget.com/definition/ActionScript</a>.&gt;</span>
        </p>

        <p class="source">Waldron, Rick. "The Flash History." <i>Flashmagazine.com</i>. Digiguru, 20 Nov. 2000. Web. <br/>
            <span class="tab">&lt;<a href="http://www.flashmagazine.com/news/detail/the_flash_history/" target="_blank">http://www.flashmagazine.com/news/detail/the_flash_history/</a>.&gt;</span>
        </p>
尽管有其他外部链接传递,但他们仍然无法通过。 enter image description here

2 个答案:

答案 0 :(得分:-1)

要将某些内容验证为XHTML,它必须是格式良好的XML。所以所有的&符号,甚至属性值中的符号都必须被转义。例如,

... professional/?sdid=JRSIQ&mv=search ...

应该写成

... professional/?sdid=JRSIQ&amp;mv=search ...

否则,验证者会认为您正在使用不存在的实体&mv。因此错误。

编辑:与其他答案所说的相反,&amp;是一个有效的XML实体名称;见official definition of XML。另一个答案可能与&eacute;&nbsp;等实体相混淆,这些实体在HTML中有效,但在XHTML中无效。

答案 1 :(得分:-1)

使用&#38;这样的数字HTML实体作为的&符号 HTML和XML解析器,而不是不是有效实体的&amp;December网站有一个相当详尽的列表,我也强烈推荐Unicode Character Table网站。

我的平台和网站(我的个人资料中的链接)作为XHTML5提供,并使用UTF8字符代替图片(更少的HTTP请求以获得更好的性能),因此如果您正在寻找XHTML5网站的完整示例您会在我的个人资料中找到它。

我不会住在这里,虽然我会四处寻找并试图给某些标签提供积极的支持,特别是因为很多人在XHTML5方面都是负面的。还有其他问题需要评论。 : - )