xsl-list
[Top] [All Lists]

transformation adds attributes in TEI.2

2004-06-08 20:35:44
I've noticed for a long time that when I do a transformation of a TEI.2
document, the transformation adds attributes. 

I assume that the transformer reads the DTD and adds the attributes
accordingly. Is this correct? Why does it do this? What advantages are
gained from adding these attributes?

Here is my stylesheet, input document, and output document.

Thanks

Paul



Here is my simple stylesheet:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                             version="1.0">

<xsl:template match="@*|node()">
                <xsl:copy>
                        <xsl:apply-templates
                                select="@*|node()"/>
                </xsl:copy>
        </xsl:template>
</xsl:stylesheet>


Here is my in document:

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE TEI.2 SYSTEM "/home/paul/Documents/data/dtds/tei_prose_verse_gen.dtd">

<TEI.2>
    <teiHeader>   
        <fileDesc>
            <titleStmt>
                <title >
                    title of document
                </title>
            </titleStmt>
            <publicationStmt>
                <distributor>
                    none
                </distributor>
            </publicationStmt>
            <sourceDesc>
                <p>no source--a manuscript</p>
            </sourceDesc>
        </fileDesc>
    </teiHeader>
    <text>
        <body >
            <p>hello world</p>
        </body>
    </text>
</TEI.2>

Here is my out document:

<?xml version="1.0"?>
<TEI.2 TEIform="TEI.2">
 <teiHeader TEIform="teiHeader" status="new" type="text">
  <fileDesc TEIform="fileDesc">
   <titleStmt TEIform="titleStmt">
    <title TEIform="title">title of document</title>
   </titleStmt>
   <publicationStmt TEIform="publicationStmt">
    <distributor TEIform="distributor">none </distributor>
   </publicationStmt>
   <sourceDesc TEIform="sourceDesc" default="NO">
    <p TEIform="p">no source--a manuscript</p>
   </sourceDesc>
  </fileDesc>
 </teiHeader>
 <text TEIform="text">
  <body TEIform="body">
   <div TEIform="div" part="N" sample="complete" org="uniform">
    <head TEIform="head">title of division</head>
    <div TEIform="div" part="N" sample="complete" org="uniform">
        <figure TEIform="figure" entity="Fig1">
            <figDesc TEIform="figDesc">4 dogs playing poker.</figDesc>
        </figure>
    </div>
   </div>
  </body>
 </text>
</TEI.2>

-- 

************************
*Paul Tremblay         *
*phthenry(_at_)earthlink(_dot_)net*
************************


<Prev in Thread] Current Thread [Next in Thread>