www.webdeveloper.com
Results 1 to 2 of 2

Thread: xsl:document

  1. #1
    Join Date
    Feb 2003
    Posts
    5

    xsl:document

    Bonjour,
    Je suis en train de tester xsl:document

    Voici mon fichier xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE poem SYSTEM "C:\Documents and Settings\michael\Desktop\New
    Folder\poem.dtd">
    <poem>
    <author>Rupert Brooke</author>
    <date>19212</date>
    <title>Song</title>
    <stranza>
    <line>And suddenly the wind comes soft,</line>
    <line>And the sbhbhkjhbhbjhbhjbhjbhbh</line>
    <line>And the sbhbhkjhbhbjhbhjbhjbhbh</line>
    </stranza>
    </poem>

    Voila mon fichier xsl:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.1"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <xsl:template match="poem">
    <poem>
    <xsl:copy-of select="title"/>
    <xsl:copy-of select="author"/>
    <xsl:copy-of select="date"/>
    <xsl:apply-templates select="stranza" />
    </poem>
    </xsl:template>

    <xsl:template match="stranza">
    <xsl:variable name="file" select="concat('verse',position(),'.xml')"/>
    <verse number="{position()}" href="{$file}"/>
    <xsl:document href="{$file}">
    <xsl:copy-of select="."/>
    </xsl:document>
    </xsl:template>
    </xsl:stylesheet>

    En faite il créé bien mon fichier de sortie suivant:
    <?xml version="1.0" encoding="UTF-8"?>
    <poem xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <title>Song</title>
    <author>Rupert Brooke
    </author><date>19212</date>
    <verse number="1" href="verse1.xml"/>
    </poem>

    Mais il ne créé pas mon fichier verse1.xml , quelqu'un pourrait me dire pq
    et quel est mon erreur car je ne trouve pas ce qui cloche merci!!!

    Cordialement Thiébault Michaël

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    2,653
    you would have a better chance of some one answering your post if more people could undertand your question..



    Khalid

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles