[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

transformation adds attributes in TEI.2

Subject: transformation adds attributes in TEI.2
From: Paul Tremblay <phthenry@xxxxxxxxxxxxx>
Date: Tue, 8 Jun 2004 23:35:44 -0400
tei.2
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@xxxxxxxxxxxxx*
************************

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.