以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 XQuery/XLink/XPointer/ 』  (http://bbs.xml.org.cn/list.asp?boardid=14)
----  [推荐]一道简单的simple xlink英文原题{哪位高手知道?}  (http://bbs.xml.org.cn/dispbbs.asp?boardid=14&rootid=&id=24864)


--  作者:tomhe
--  发布时间:12/1/2005 10:33:00 AM

--  [推荐]一道简单的simple xlink英文原题{哪位高手知道?}
Suppose we have an XML document which contains XLink mark-up using only simple links. Each of these simple links will appear as attributes to elements named s-link. The attributes will also designate whether to actuate these links upon request, or upon loading of the document in to an appplication. The xlink:show attribute for all of these links is assumed to have value replace by Firefox. For the purposes of this question, I want you to implement an 'embed' semantics for the load-actuated links.

The behaviour of Firefox on loading the XML document should be to process the xlink mark-up so as to provide clickable links for those simple links which are actuated upon request, and download and inline the content for those which are actuated upon loading.

For our purposes we would like to inline the load-actuated links before feeding the file to a browser.

Write a Java application using the JAXP DOM API which will parse the XML document and replace every s-link element with a load-actuated link with the XML document it links to. Write the resulting XML document out to a file.

Your answer should consist of the Java class source code which performs this operation.


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
31.250ms