新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> 本版讨论XSL,XSLT,XSL-FO,CSS等技术
    [返回] 中文XML论坛 - 专业的XML技术讨论区XML.ORG.CN讨论区 - XML技术『 XSL/XSLT/XSL-FO/CSS 』 → [求助]谁能解决以下问题!!!可以有一定报酬~ 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 2543 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: [求助]谁能解决以下问题!!!可以有一定报酬~ 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     都市飞鸟 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:1
      积分:56
      门派:XML.ORG.CN
      注册:2005/12/7

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给都市飞鸟发送一个短消息 把都市飞鸟加入好友 查看都市飞鸟的个人资料 搜索都市飞鸟在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 引用回复这个贴子 回复这个贴子 查看都市飞鸟的博客楼主
    发贴心情 [求助]谁能解决以下问题!!!可以有一定报酬~

    Using XSLT to manipulate XML
    To apply your stylesheet transform at the command line use: java org.apache.xalan.xslt.Process -IN foo [-XSL sheet -OUT bar ] where foo, bar and sheet are the names of the input file, output file and stylesheet respectively (if this does not work for you then see the note below).

    Alternatively, link your stylesheet to your XML document and browse the document in Firefox.

    Remember, this is an assessed piece of work. Please do not collude or plagiarise other peoples work as the standard university penalties for doing so will be applied.

    Question One.
    For the XML file phone-numbers.xml, write an XSLT transform which will transform the document in to XHTML/HTML such that there is a heading saying something like "Friends' numbers" and all the friends' phone numbers (and only those) are provided in a list below it. The friend's name should appear following their phone number. Moreover, those numbers with the area code (01273) should be displayed in red.

    The output for the given file could be something like:

    Friend's numbers
    (01273) 555-1999 Ms C.
    (01903) 555-1111 Dr D.
    (01273) 555-4312 Sir F.

    Question Two.
    Write an XSLT transform which will reverse the order of all of the children elements of an XML document. You may ignore any attributes, comments and processing instruction nodes.

    (Hint: the solution to this can be provided in a single template. Sorting can be done by using the XSL sort attribute. You need to find the right key to sort on.)

    Question Three.
    A very bizarre customer has decided that they have an aversion to the letter 'e'. They would like to transform all of their XML element and attribute names to the same tags with any occurrences of the offending letter removed. Write an XSLT transform to do this for any of their documents.

    (Hint: the XPath string function translate will be useful here.)

    Question Four (optional)
    Use XSLT to implement a footnote system. For example, suppose you introduce an element in your XML markup called footnote, such that whenever such an element appears within a paragraph, then the content of the footnote element is taken out of the normal flow and listed (numbered) at the bottom of the document in a smaller font(*). An asterisk for each footnote should appear inline in the text at the point at which the markup occurred.


    --------------------------------------------------------------------------------
    1.Just like this

    A note on the CLASSPATH

    The CLASSPATH variable on the teaching machines did not get updated on the lab machines when the Java upgrade was made. You will need to include the path C:\j2sdk\jre\lib\rt.jar in your CLASSPATH. You can do this by using java -cp C:\j2sdk\jre\lib\rt.jar org.apache.xalan.xslt.Process -IN foo [-XSL sheet -OUT bar ] or by setting a new CLASSPATH environment variable from the Properties dialogue on your machine.

    Page maintained by Julian Rathke.


       收藏   分享  
    顶(0)
      




    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2005/12/7 14:55:00
     
     都市飞鸟 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:1
      积分:56
      门派:XML.ORG.CN
      注册:2005/12/7

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给都市飞鸟发送一个短消息 把都市飞鸟加入好友 查看都市飞鸟的个人资料 搜索都市飞鸟在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 引用回复这个贴子 回复这个贴子 查看都市飞鸟的博客2
    发贴心情 
    Knitting simple XLinks
    I'm using Java version 1.4 (j2SE 1.4.2) for the purposes of this course. If you have a different Java install then you will need to consult your API documentation for the changes to the JAXP.

    You might find it useful to download the SerializeHack java class.

    Remember, this is an assessed piece of work. Please do not collude or plagiarise other peoples work as the standard university penalties for doing so will be applied.

    Question One.
    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.


    --------------------------------------------------------------------------------

    I've provided a few example xml files for you to test your answer with below but please experiment with your own files also.

    Document with links
    sheet5.css
    slide1.xml
    slide2.xml
    slide3.xml
    slide4.xml
    slide5.xml
    slide6.xml

    Page maintained by Julian Rathke.

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2005/12/7 14:58:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2025/10/2 21:11:05

    本主题贴数2,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    62.500ms