Libxml 1.0 Issue 4 #288

Closed
opened 2024-06-04 16:10:29 +02:00 by binkowsp · 1 comment

No error, no output

XML

<?xml version="1.0" encoding="UTF-8"?>
<a:authors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns="http://www.demo.com/author"
           xmlns:a="http://www.demo.com/author"
           xmlns:p="http://www.demo.com/person"
           xsi:schemaLocation="http://www.demo.com/author author.xsd">
    <a:author id="1">
        <p:firstName>William</p:firstName>
        <p:lastName>Shakespeare</p:lastName>
        <a:dateOfBirth>1564-04-23</a:dateOfBirth>
        <a:dateOfDeath>1616-04-23</a:dateOfDeath>
    </a:author>
    <a:author id="2">
        <p:firstName>J.K.</p:firstName>
        <p:lastName>Rowling</p:lastName>
        <a:dateOfBirth>1965-07-31</a:dateOfBirth>
    </a:author>
    <a:author id="3">
        <p:firstName>Paulo</p:firstName>
        <p:lastName>Coelho</p:lastName>
        <a:dateOfBirth>1947-08-24</a:dateOfBirth>
    </a:author>
    <a:author id="4">
        <p:firstName>Stephen</p:firstName>
        <p:lastName>King</p:lastName>
        <a:dateOfBirth>1947-09-21</a:dateOfBirth>
    </a:author>
    <a:author id="5">
        <p:firstName>Tom</p:firstName>
        <p:lastName>Clancy</p:lastName>
        <a:dateOfBirth>1947-04-12</a:dateOfBirth>
        <a:dateOfDeath>2013-10-01</a:dateOfDeath>
    </a:author>
    <a:author id="6">
        <p:firstName>Napoleon</p:firstName>
        <p:lastName>Hill</p:lastName>
        <a:dateOfBirth>1883-09-26</a:dateOfBirth>
        <a:dateOfDeath>1970-11-08</a:dateOfDeath>
    </a:author>
</a:authors>

XSLT

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:a="http://www.demo.com/author"
                exclude-result-prefixes="xsl a">
        <xsl:template match="/">
            <a:authors>
              <xsl:copy-of select="a:authors/a:author[a:dateOfDeath]" copy-namespaces="no"/>
            </a:authors>
        </xsl:template>
</xsl:stylesheet>
No error, no output XML ``` <?xml version="1.0" encoding="UTF-8"?> <a:authors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.demo.com/author" xmlns:a="http://www.demo.com/author" xmlns:p="http://www.demo.com/person" xsi:schemaLocation="http://www.demo.com/author author.xsd"> <a:author id="1"> <p:firstName>William</p:firstName> <p:lastName>Shakespeare</p:lastName> <a:dateOfBirth>1564-04-23</a:dateOfBirth> <a:dateOfDeath>1616-04-23</a:dateOfDeath> </a:author> <a:author id="2"> <p:firstName>J.K.</p:firstName> <p:lastName>Rowling</p:lastName> <a:dateOfBirth>1965-07-31</a:dateOfBirth> </a:author> <a:author id="3"> <p:firstName>Paulo</p:firstName> <p:lastName>Coelho</p:lastName> <a:dateOfBirth>1947-08-24</a:dateOfBirth> </a:author> <a:author id="4"> <p:firstName>Stephen</p:firstName> <p:lastName>King</p:lastName> <a:dateOfBirth>1947-09-21</a:dateOfBirth> </a:author> <a:author id="5"> <p:firstName>Tom</p:firstName> <p:lastName>Clancy</p:lastName> <a:dateOfBirth>1947-04-12</a:dateOfBirth> <a:dateOfDeath>2013-10-01</a:dateOfDeath> </a:author> <a:author id="6"> <p:firstName>Napoleon</p:firstName> <p:lastName>Hill</p:lastName> <a:dateOfBirth>1883-09-26</a:dateOfBirth> <a:dateOfDeath>1970-11-08</a:dateOfDeath> </a:author> </a:authors> ``` XSLT ``` <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://www.demo.com/author" exclude-result-prefixes="xsl a"> <xsl:template match="/"> <a:authors> <xsl:copy-of select="a:authors/a:author[a:dateOfDeath]" copy-namespaces="no"/> </a:authors> </xsl:template> </xsl:stylesheet> ```
Collaborator

fixed in #297

fixed in #297
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: R11/release11-tools#288
No description provided.