Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / March 2007

Tip: Looking for answers? Try searching our database.

Default attributes from DTD while transformation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mahesh.nimbalkar@gmail.com - 26 Mar 2007 21:04 GMT
When I transform XML, XSLT automatically adds extra attributes to the
node which are declared in DTD (default DTD attributes) . I just want
XSLT not to add these extra default attributes from DTD.

See refname and shortname attributes are added to node automatically
after transformation.

Please let me know how to fix this.

----------------------------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE ONIXMessage SYSTEM "http://www.editeur.org/onix/2.1/
reference/onix-international.dtd">
<ONIXMessage>
 <Header>
   <FromEANNumber>5013546111661</FromEANNumber>
   <FromCompany>NielsenBookData</FromCompany>
   <FromPerson>Angela Kendall</FromPerson>
   <FromEmail>angela.kendall@nielsenbookdata.co.uk</FromEmail>
   <SentDate>20061213</SentDate>
   <DefaultLanguageOfText>eng</DefaultLanguageOfText>
 </Header>
 <Product>
   <RecordReference>9780643091610</RecordReference>
   <NotificationType>03</NotificationType>
   <RecordSourceType>04</RecordSourceType>
   <RecordSourceName>Nielsen BookData</RecordSourceName>
   <RecordSourceIdentifierType>02</RecordSourceIdentifierType>
   <RecordSourceIdentifier>NBD</RecordSourceIdentifier>
   <ProductIdentifier>
     <ProductIDType>15</ProductIDType>
     <IDValue>9780643091610</IDValue>
   </ProductIdentifier>
   <ProductForm>BB</ProductForm>
   <Title>
     <TitleType>01</TitleType>
     <TitleText>The Nature of Plants</TitleText>
     <TitlePrefix>The</TitlePrefix>
     <TitleWithoutPrefix>Nature of Plants</TitleWithoutPrefix>
     <Subtitle>Habitats, Challenges and Adaptations</Subtitle>
   </Title>
   <Contributor>
     <SequenceNumber>1</SequenceNumber>
     <ContributorRole>A01</ContributorRole>
     <PersonName>John Dawson</PersonName>
     <PersonNameInverted>Dawson, John</PersonNameInverted>
     <NamesBeforeKey>John</NamesBeforeKey>
     <KeyNames>Dawson</KeyNames>
   </Contributor>
   <Contributor>
     <SequenceNumber>2</SequenceNumber>
     <ContributorRole>A01</ContributorRole>
     <PersonName>Rob Lucas</PersonName>
     <PersonNameInverted>Lucas, Rob</PersonNameInverted>
     <NamesBeforeKey>Rob</NamesBeforeKey>
     <KeyNames>Lucas</KeyNames>
   </Contributor>
   <EditionStatement>New title</EditionStatement>
   <NumberOfPages>314</NumberOfPages>
   <IllustrationsNote>colour photos &amp; illus</IllustrationsNote>
   <BASICMainSubject>GAR000000</BASICMainSubject>
   <BASICVersion>BISAC V2.8</BASICVersion>
   <BICMainSubject>VG</BICMainSubject>
   <BICVersion>1.1</BICVersion>
   <Subject>
     <SubjectSchemeIdentifier>01</SubjectSchemeIdentifier>
     <SubjectSchemeVersion>DC21</SubjectSchemeVersion>
     <SubjectCode>635</SubjectCode>
   </Subject>
   <AudienceCode>01</AudienceCode>
   <AudienceCode>05</AudienceCode>
   <OtherText>
     <TextTypeCode>02</TextTypeCode>
     <Text>There has always been interest in how animals live their
lives - it is easy for us to identify with them. But there are many
remarkable stories about plants that deserve to be told. This book
tells how plants adapt to the challenges of their habitats.</Text>
   </OtherText>
   <Imprint>
     <NameCodeType>02</NameCodeType>
     <NameCodeTypeName>Nielsen BookData Org ID</NameCodeTypeName>
     <NameCodeValue>110001</NameCodeValue>
     <ImprintName>CSIRO Publishing</ImprintName>
   </Imprint>
   <Publisher>
     <NameCodeType>02</NameCodeType>
     <NameCodeTypeName>Nielsen BookData Org ID</NameCodeTypeName>
     <NameCodeValue>110001</NameCodeValue>
     <PublisherName>CSIRO Publishing</PublisherName>
   </Publisher>
   <CityOfPublication>Melbourne</CityOfPublication>
   <CountryOfPublication>AU</CountryOfPublication>
   <PublishingStatus>04</PublishingStatus>
   <PublicationDate>20050301</PublicationDate>
   <SalesRights>
     <SalesRightsType>02</SalesRightsType>
     <RightsCountry>AU NZ</RightsCountry>
   </SalesRights>
   <Measure>
     <MeasureTypeCode>01</MeasureTypeCode>
     <Measurement>260</Measurement>
     <MeasureUnitCode>mm</MeasureUnitCode>
   </Measure>
   <Measure>
     <MeasureTypeCode>02</MeasureTypeCode>
     <Measurement>185</Measurement>
     <MeasureUnitCode>mm</MeasureUnitCode>
   </Measure>
   <Measure>
     <MeasureTypeCode>08</MeasureTypeCode>
     <Measurement>1180</Measurement>
     <MeasureUnitCode>gr</MeasureUnitCode>
   </Measure>
   <SupplyDetail>
     <SupplierName>Supplier Unknown</SupplierName>
     <SupplierRole>00</SupplierRole>
     <SupplyToCountry>GB</SupplyToCountry>
     <ProductAvailability>43</ProductAvailability>
     <Price>
       <PriceTypeCode>02</PriceTypeCode>
       <PriceAmount>0.50</PriceAmount>
       <CurrencyCode>GBP</CurrencyCode>
       <TaxRateCode1>Z</TaxRateCode1>
       <TaxRatePercent1>0.0</TaxRatePercent1>
       <TaxableAmount1>0.50</TaxableAmount1>
       <TaxAmount1>0.00</TaxAmount1>
     </Price>
   </SupplyDetail>
   <SupplyDetail>
     <SupplierIdentifier>
       <SupplierIDType>02</SupplierIDType>
       <IDTypeName>Nielsen BookData Org ID</IDTypeName>
       <IDValue>72077</IDValue>
     </SupplierIdentifier>
     <SupplierName>Eurospan Group Ltd</SupplierName>
     <SupplierRole>00</SupplierRole>
     <SupplyToCountry>GB</SupplyToCountry>
     <ProductAvailability>99</ProductAvailability>
     <UnpricedItemType>04</UnpricedItemType>
   </SupplyDetail>
   <SupplyDetail>
     <SupplierIdentifier>
       <SupplierIDType>02</SupplierIDType>
       <IDTypeName>Nielsen BookData Org ID</IDTypeName>
       <IDValue>117189</IDValue>
     </SupplierIdentifier>
     <SupplierName>Antipodes Books and Beyond</SupplierName>
     <SupplierRole>00</SupplierRole>
     <SupplyToCountry>US</SupplyToCountry>
     <ProductAvailability>99</ProductAvailability>
     <UnpricedItemType>04</UnpricedItemType>
   </SupplyDetail>
   <SupplyDetail>
     <SupplierIdentifier>
       <SupplierIDType>02</SupplierIDType>
       <IDTypeName>Nielsen BookData Org ID</IDTypeName>
       <IDValue>120778</IDValue>
     </SupplierIdentifier>
     <SupplierName>CSIRO Publishing</SupplierName>
     <SupplierRole>00</SupplierRole>
     <SupplyToCountry>AU</SupplyToCountry>
     <ProductAvailability>99</ProductAvailability>
     <UnpricedItemType>04</UnpricedItemType>
   </SupplyDetail>
   <SupplyDetail>
     <SupplierIdentifier>
       <SupplierIDType>02</SupplierIDType>
       <IDTypeName>Nielsen BookData Org ID</IDTypeName>
       <IDValue>114396</IDValue>
     </SupplierIdentifier>
     <SupplierName>University and Reference Publishers' Services
(UNIREPS)</SupplierName>
     <SupplierRole>00</SupplierRole>
     <SupplyToCountry>AU</SupplyToCountry>
     <ProductAvailability>99</ProductAvailability>
     <UnpricedItemType>04</UnpricedItemType>
   </SupplyDetail>
   <SupplyDetail>
     <SupplierIdentifier>
       <SupplierIDType>02</SupplierIDType>
       <IDTypeName>Nielsen BookData Org ID</IDTypeName>
       <IDValue>123799</IDValue>
     </SupplierIdentifier>
     <SupplierName>Manaaki Whenua Press</SupplierName>
     <SupplierRole>00</SupplierRole>
     <SupplyToCountry>NZ</SupplyToCountry>
     <ProductAvailability>99</ProductAvailability>
     <UnpricedItemType>04</UnpricedItemType>
   </SupplyDetail>
   <SupplyDetail>
     <SupplierIdentifier>
       <SupplierIDType>02</SupplierIDType>
       <IDTypeName>Nielsen BookData Org ID</IDTypeName>
       <IDValue>114396</IDValue>
     </SupplierIdentifier>
     <SupplierName>University and Reference Publishers' Services
(UNIREPS)</SupplierName>
     <SupplierRole>00</SupplierRole>
     <SupplyToCountry>NZ</SupplyToCountry>
     <ProductAvailability>99</ProductAvailability>
     <UnpricedItemType>04</UnpricedItemType>
   </SupplyDetail>
   <SupplyDetail>
     <SupplierIdentifier>
       <SupplierIDType>02</SupplierIDType>
       <IDTypeName>Nielsen BookData Org ID</IDTypeName>
       <IDValue>72077</IDValue>
     </SupplierIdentifier>
     <SupplierName>Eurospan Group Ltd</SupplierName>
     <SupplierRole>00</SupplierRole>
     <SupplyToCountry>IE</SupplyToCountry>
     <ProductAvailability>99</ProductAvailability>
     <UnpricedItemType>04</UnpricedItemType>
   </SupplyDetail>
   <MarketRepresentation>
     <AgentName>University and Reference Publishers' Services
(UNIREPS)</AgentName>
     <AgentRole>07</AgentRole>
     <MarketCountry>AU</MarketCountry>
   </MarketRepresentation>
 </Product>
 <Product>
</ONIXMessage>

-------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

   <xsl:output method="xml" version="1.0" encoding="ISO-8859-1" omit-
xml-declaration="no" indent="yes"/>
   <xsl:output doctype-system="http://www.editeur.org/onix/2.1/
reference/onix-international.dtd"/>

   <xsl:template match="/">
       <xsl:comment>Transformed by ONIX Loader to make this valid XML
file</xsl:comment>

       <ONIXMessage>
           <Header>
               <xsl:apply-templates select="ONIXMessage/Header/
node()"/>
           </Header>

           <xsl:apply-templates select="ONIXMessage/Product"/>
       </ONIXMessage>
   </xsl:template>

   <xsl:template match="Product">
       <Product>
           <xsl:apply-templates select="RecordReference"/>
           <xsl:apply-templates select="NotificationType"/>
           <xsl:apply-templates select="RecordSourceType"/>
           <xsl:apply-templates select="RecordSourceIdentifierType"/>
           <xsl:apply-templates select="RecordSourceIdentifier"/>
           <xsl:apply-templates select="RecordSourceName"/>

           <xsl:apply-templates select="node()
               [
               name(.) != 'RecordReference'
               and name(.) != 'NotificationType'
               and name(.) != 'RecordSourceType'
               and name(.) != 'RecordSourceIdentifierType'
               and name(.) != 'RecordSourceIdentifier'
               and name(.) != 'RecordSourceName'
               ]"/>
       </Product>
   </xsl:template>

   <xsl:template match="*">
       <xsl:copy>
           <xsl:copy-of select="node()"/>
       </xsl:copy>
   </xsl:template>

</xsl:stylesheet>
--------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<!--Transformed by ONIX Loader to make this valid XML file->
<!DOCTYPE ONIXMessage SYSTEM "http://www.editeur.org/onix/2.1/
reference/onix-international.dtd">
<ONIXMessage>
 <Header>
   <FromEANNumber>5013546111661</FromEANNumber>
   <FromCompany>NielsenBookData</FromCompany>
   <FromPerson>Angela Kendall</FromPerson>
   <FromEmail>angela.kendall@nielsenbookdata.co.uk</FromEmail>
   <SentDate>20061213</SentDate>
   <DefaultLanguageOfText>eng</DefaultLanguageOfText>
 </Header>
 <Product>
   <RecordReference>9780643091610</RecordReference>
   <NotificationType>03</NotificationType>
   <RecordSourceType>04</RecordSourceType>
   <RecordSourceIdentifierType>02</RecordSourceIdentifierType>
   <RecordSourceIdentifier>NBD</RecordSourceIdentifier>
   <RecordSourceName>Nielsen BookData</RecordSourceName>
   <ProductIdentifier>
     <ProductIDType refname="ProductIDType" shortname="b221">15</
ProductIDType>
     <IDValue refname="IDValue" shortname="b244">9780643091610</
IDValue>
   </ProductIdentifier>
   <ProductForm>BB</ProductForm>
   <Title>
     <TitleType refname="TitleType" shortname="b202">01</TitleType>
     <TitleText refname="TitleText" shortname="b203">The Nature of
Plants</TitleText>
     <TitlePrefix refname="TitlePrefix" shortname="b030">The</
TitlePrefix>
     <TitleWithoutPrefix refname="TitleWithoutPrefix"
shortname="b031">Nature of Plants</TitleWithoutPrefix>
     <Subtitle refname="Subtitle" shortname="b029">Habitats,
Challenges and Adaptations</Subtitle>
   </Title>
   <Contributor>
     <SequenceNumber refname="SequenceNumber" shortname="b034">1</
SequenceNumber>
     <ContributorRole refname="ContributorRole" shortname="b035">A01</
ContributorRole>
     <PersonName refname="PersonName" shortname="b036">John Dawson</
PersonName>
     <PersonNameInverted refname="PersonNameInverted"
shortname="b037">Dawson, John</PersonNameInverted>
     <NamesBeforeKey refname="NamesBeforeKey" shortname="b039">John</
NamesBeforeKey>
     <KeyNames refname="KeyNames" shortname="b040">Dawson</KeyNames>
   </Contributor>
   <Contributor>
     <SequenceNumber refname="SequenceNumber" shortname="b034">2</
SequenceNumber>
     <ContributorRole refname="ContributorRole" shortname="b035">A01</
ContributorRole>
     <PersonName refname="PersonName" shortname="b036">Rob Lucas</
PersonName>
     <PersonNameInverted refname="PersonNameInverted"
shortname="b037">Lucas, Rob</PersonNameInverted>
     <NamesBeforeKey refname="NamesBeforeKey" shortname="b039">Rob</
NamesBeforeKey>
     <KeyNames refname="KeyNames" shortname="b040">Lucas</KeyNames>
   </Contributor>
   <EditionStatement>New title</EditionStatement>
   <NumberOfPages>314</NumberOfPages>
   <IllustrationsNote>colour photos &amp; illus</IllustrationsNote>
   <BASICMainSubject>GAR000000</BASICMainSubject>
   <BASICVersion>BISAC V2.8</BASICVersion>
   <BICMainSubject>VG</BICMainSubject>
   <BICVersion>1.1</BICVersion>
   <Subject>
     <SubjectSchemeIdentifier refname="SubjectSchemeIdentifier"
shortname="b067">01</SubjectSchemeIdentifier>
     <SubjectSchemeVersion refname="SubjectSchemeVersion"
shortname="b068">DC21</SubjectSchemeVersion>
     <SubjectCode refname="SubjectCode" shortname="b069">635</
SubjectCode>
   </Subject>
   <AudienceCode>01</AudienceCode>
   <AudienceCode>05</AudienceCode>
   <OtherText>
     <TextTypeCode refname="TextTypeCode" shortname="d102">02</
TextTypeCode>
     <Text refname="Text" shortname="d104">There has always been
interest in how animals live their lives - it is easy for us to
identify with them. But there are many remarkable stories about plants
that deserve to be told. This book tells how plants adapt to the
challenges of their habitats.</Text>
   </OtherText>
   <Imprint>
     <NameCodeType refname="NameCodeType" shortname="b241">02</
NameCodeType>
     <NameCodeTypeName refname="NameCodeTypeName"
shortname="b242">Nielsen BookData Org ID</NameCodeTypeName>
     <NameCodeValue refname="NameCodeValue" shortname="b243">110001</
NameCodeValue>
     <ImprintName refname="ImprintName" shortname="b079">CSIRO
Publishing</ImprintName>
   </Imprint>
   <Publisher>
     <NameCodeType refname="NameCodeType" shortname="b241">02</
NameCodeType>
     <NameCodeTypeName refname="NameCodeTypeName"
shortname="b242">Nielsen BookData Org ID</NameCodeTypeName>
     <NameCodeValue refname="NameCodeValue" shortname="b243">110001</
NameCodeValue>
     <PublisherName refname="PublisherName" shortname="b081">CSIRO
Publishing</PublisherName>
   </Publisher>
   <CityOfPublication>Melbourne</CityOfPublication>
   <CountryOfPublication>AU</CountryOfPublication>
   <PublishingStatus>04</PublishingStatus>
   <PublicationDate>20050301</PublicationDate>
   <SalesRights>
     <SalesRightsType refname="SalesRightsType" shortname="b089">02</
SalesRightsType>
     <RightsCountry refname="RightsCountry" shortname="b090">AU NZ</
RightsCountry>
   </SalesRights>
   <Measure>
     <MeasureTypeCode refname="MeasureTypeCode" shortname="c093">01</
MeasureTypeCode>
     <Measurement refname="Measurement" shortname="c094">260</
Measurement>
     <MeasureUnitCode refname="MeasureUnitCode" shortname="c095">mm</
MeasureUnitCode>
   </Measure>
   <Measure>
     <MeasureTypeCode refname="MeasureTypeCode" shortname="c093">02</
MeasureTypeCode>
     <Measurement refname="Measurement" shortname="c094">185</
Measurement>
     <MeasureUnitCode refname="MeasureUnitCode" shortname="c095">mm</
MeasureUnitCode>
   </Measure>
   <Measure>
     <MeasureTypeCode refname="MeasureTypeCode" shortname="c093">08</
MeasureTypeCode>
     <Measurement refname="Measurement" shortname="c094">1180</
Measurement>
     <MeasureUnitCode refname="MeasureUnitCode" shortname="c095">gr</
MeasureUnitCode>
   </Measure>
   <SupplyDetail>
     <SupplierName refname="SupplierName" shortname="j137">Supplier
Unknown</SupplierName>
     <SupplierRole refname="SupplierRole" shortname="j292">00</
SupplierRole>
     <SupplyToCountry refname="SupplyToCountry" shortname="j138">GB</
SupplyToCountry>
     <ProductAvailability refname="ProductAvailability"
shortname="j396">43</ProductAvailability>
     <Price refname="Price" shortname="price">
       <PriceTypeCode refname="PriceTypeCode" shortname="j148">02</
PriceTypeCode>
       <PriceAmount refname="PriceAmount" shortname="j151">0.50</
PriceAmount>
       <CurrencyCode refname="CurrencyCode" shortname="j152">GBP</
CurrencyCode>
       <TaxRateCode1 refname="TaxRateCode1" shortname="j153">Z</
TaxRateCode1>
       <TaxRatePercent1 refname="TaxRatePercent1"
shortname="j154">0.0</TaxRatePercent1>
       <TaxableAmount1 refname="TaxableAmount1"
shortname="j155">0.50</TaxableAmount1>
       <TaxAmount1 refname="TaxAmount1" shortname="j156">0.00</
TaxAmount1>
     </Price>
   </SupplyDetail>
   <SupplyDetail>
     <SupplierIdentifier refname="SupplierIdentifier"
shortname="supplieridentifier">
       <SupplierIDType refname="SupplierIDType" shortname="j345">02</
SupplierIDType>
       <IDTypeName refname="IDTypeName" shortname="b233">Nielsen
BookData Org ID</IDTypeName>
       <IDValue refname="IDValue" shortname="b244">72077</IDValue>
     </SupplierIdentifier>
     <SupplierName refname="SupplierName" shortname="j137">Eurospan
Group Ltd</SupplierName>
     <SupplierRole refname="SupplierRole" shortname="j292">00</
SupplierRole>
     <SupplyToCountry refname="SupplyToCountry" shortname="j138">GB</
SupplyToCountry>
     <ProductAvailability refname="ProductAvailability"
shortname="j396">99</ProductAvailability>
     <UnpricedItemType refname="UnpricedItemType"
shortname="j192">04</UnpricedItemType>
   </SupplyDetail>
   <SupplyDetail>
     <SupplierIdentifier refname="SupplierIdentifier"
shortname="supplieridentifier">
       <SupplierIDType refname="SupplierIDType" shortname="j345">02</
SupplierIDType>
       <IDTypeName refname="IDTypeName" shortname="b233">Nielsen
BookData Org ID</IDTypeName>
       <IDValue refname="IDValue" shortname="b244">117189</IDValue>
     </SupplierIdentifier>
     <SupplierName refname="SupplierName" shortname="j137">Antipodes
Books and Beyond</SupplierName>
     <SupplierRole refname="SupplierRole" shortname="j292">00</
SupplierRole>
     <SupplyToCountry refname="SupplyToCountry" shortname="j138">US</
SupplyToCountry>
     <ProductAvailability refname="ProductAvailability"
shortname="j396">99</ProductAvailability>
     <UnpricedItemType refname="UnpricedItemType"
shortname="j192">04</UnpricedItemType>
   </SupplyDetail>
   <SupplyDetail>
     <SupplierIdentifier refname="SupplierIdentifier"
shortname="supplieridentifier">
       <SupplierIDType refname="SupplierIDType" shortname="j345">02</
SupplierIDType>
       <IDTypeName refname="IDTypeName" shortname="b233">Nielsen
BookData Org ID</IDTypeName>
       <IDValue refname="IDValue" shortname="b244">120778</IDValue>
     </SupplierIdentifier>
     <SupplierName refname="SupplierName" shortname="j137">CSIRO
Publishing</SupplierName>
     <SupplierRole refname="SupplierRole" shortname="j292">00</
SupplierRole>
     <SupplyToCountry refname="SupplyToCountry" shortname="j138">AU</
SupplyToCountry>
     <ProductAvailability refname="ProductAvailability"
shortname="j396">99</ProductAvailability>
     <UnpricedItemType refname="UnpricedItemType"
shortname="j192">04</UnpricedItemType>
   </SupplyDetail>
   <SupplyDetail>
     <SupplierIdentifier refname="SupplierIdentifier"
shortname="supplieridentifier">
       <SupplierIDType refname="SupplierIDType" shortname="j345">02</
SupplierIDType>
       <IDTypeName refname="IDTypeName" shortname="b233">Nielsen
BookData Org ID</IDTypeName>
       <IDValue refname="IDValue" shortname="b244">114396</IDValue>
     </SupplierIdentifier>
     <SupplierName refname="SupplierName" shortname="j137">University
and Reference Publishers' Services (UNIREPS)</SupplierName>
     <SupplierRole refname="SupplierRole" shortname="j292">00</
SupplierRole>
     <SupplyToCountry refname="SupplyToCountry" shortname="j138">AU</
SupplyToCountry>
     <ProductAvailability refname="ProductAvailability"
shortname="j396">99</ProductAvailability>
     <UnpricedItemType refname="UnpricedItemType"
shortname="j192">04</UnpricedItemType>
   </SupplyDetail>
   <SupplyDetail>
     <SupplierIdentifier refname="SupplierIdentifier"
shortname="supplieridentifier">
       <SupplierIDType refname="SupplierIDType" shortname="j345">02</
SupplierIDType>
       <IDTypeName refname="IDTypeName" shortname="b233">Nielsen
BookData Org ID</IDTypeName>
       <IDValue refname="IDValue" shortname="b244">123799</IDValue>
     </SupplierIdentifier>
     <SupplierName refname="SupplierName" shortname="j137">Manaaki
Whenua Press</SupplierName>
     <SupplierRole refname="SupplierRole" shortname="j292">00</
SupplierRole>
     <SupplyToCountry refname="SupplyToCountry" shortname="j138">NZ</
SupplyToCountry>
     <ProductAvailability refname="ProductAvailability"
shortname="j396">99</ProductAvailability>
     <UnpricedItemType refname="UnpricedItemType"
shortname="j192">04</UnpricedItemType>
   </SupplyDetail>
   <SupplyDetail>
     <SupplierIdentifier refname="SupplierIdentifier"
shortname="supplieridentifier">
       <SupplierIDType refname="SupplierIDType" shortname="j345">02</
SupplierIDType>
       <IDTypeName refname="IDTypeName" shortname="b233">Nielsen
BookData Org ID</IDTypeName>
       <IDValue refname="IDValue" shortname="b244">114396</IDValue>
     </SupplierIdentifier>
     <SupplierName refname="SupplierName" shortname="j137">University
and Reference Publishers' Services (UNIREPS)</SupplierName>
     <SupplierRole refname="SupplierRole" shortname="j292">00</
SupplierRole>
     <SupplyToCountry refname="SupplyToCountry" shortname="j138">NZ</
SupplyToCountry>
     <ProductAvailability refname="ProductAvailability"
shortname="j396">99</ProductAvailability>
     <UnpricedItemType refname="UnpricedItemType"
shortname="j192">04</UnpricedItemType>
   </SupplyDetail>
   <SupplyDetail>
     <SupplierIdentifier refname="SupplierIdentifier"
shortname="supplieridentifier">
       <SupplierIDType refname="SupplierIDType" shortname="j345">02</
SupplierIDType>
       <IDTypeName refname="IDTypeName" shortname="b233">Nielsen
BookData Org ID</IDTypeName>
       <IDValue refname="IDValue" shortname="b244">72077</IDValue>
     </SupplierIdentifier>
     <SupplierName refname="SupplierName" shortname="j137">Eurospan
Group Ltd</SupplierName>
     <SupplierRole refname="SupplierRole" shortname="j292">00</
SupplierRole>
     <SupplyToCountry refname="SupplyToCountry" shortname="j138">IE</
SupplyToCountry>
     <ProductAvailability refname="ProductAvailability"
shortname="j396">99</ProductAvailability>
     <UnpricedItemType refname="UnpricedItemType"
shortname="j192">04</UnpricedItemType>
   </SupplyDetail>
   <MarketRepresentation>
     <AgentName refname="AgentName" shortname="j401">University and
Reference Publishers' Services (UNIREPS)</AgentName>
     <AgentRole refname="AgentRole" shortname="j402">07</AgentRole>
     <MarketCountry refname="MarketCountry" shortname="j403">AU</
MarketCountry>
   </MarketRepresentation>
 </Product>
Bjoern Hoehrmann - 27 Mar 2007 12:45 GMT
* mahesh.nimbalkar@gmail.com wrote in microsoft.public.dotnet.xml:
>When I transform XML, XSLT automatically adds extra attributes to the
>node which are declared in DTD (default DTD attributes) . I just want
>XSLT not to add these extra default attributes from DTD.

Then you have to remove the document type declaration or otherwise
instruct your transformation engine and/or parser to not read the
external subset. There is no way to achieve this using only XSLT.
Signature

Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/

mahesh.nimbalkar@gmail.com - 27 Mar 2007 22:38 GMT
Thank you for the reply Bjoern Hoehrmann

I am using following VB.NET code for transformation. Please tell me
where I can set flag for not to resolve externals.

Sub Main(ByVal args() As String)
       Dim xmlInputFile As String = args(0)
       Dim xslInputFile As String = args(1)
       Const xmlOutputFile As String = "output.xml"

       Dim xPathDoc As New XPathDocument(xmlInputFile)
       Dim transform As New XslCompiledTransform()
       Dim results As Stream = Nothing

       Try
           results = File.Create(xmlOutputFile)

           Dim argsList As New XsltArgumentList()
           Dim dateAndTime As New MyDateTime()
           argsList.AddExtensionObject("urn:MyDateTime", dateAndTime)

           transform.Load(xslInputFile)
           transform.Transform(xPathDoc, argsList, results)

       Catch ex As Exception
           results.Flush()
           Console.WriteLine(ex)
       Finally
           results.Close()
       End Try
   End Sub

> * mahesh.nimbal...@gmail.com wrote in microsoft.public.dotnet.xml:
>
[quoted text clipped - 9 lines]
> Weinh. Str. 22 · Telefon: +49(0)621/4309674 ·http://www.bjoernsworld.de
> 68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 ·http://www.websitedev.de/
Helena Kotas [MSFT] - 30 Mar 2007 23:54 GMT
You can disable to DTD from loading if you set the XmlResolver to null. To do
so you will need to load the XPathDocument from a reader:

Dim reader As New XmlTextReader(xmlInputFile)
reader.XmlResolver = null
Dim xPathDoc As New XPathDocument(reader)

HTH,
Helena Kotas, MSFT

> Thank you for the reply Bjoern Hoehrmann
>
[quoted text clipped - 41 lines]
> > Weinh. Str. 22 · Telefon: +49(0)621/4309674 ·http://www.bjoernsworld.de
> > 68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 ·http://www.websitedev.de/
Peter Flynn - 27 Mar 2007 23:38 GMT
> * mahesh.nimbalkar@gmail.com wrote in microsoft.public.dotnet.xml:
>> When I transform XML, XSLT automatically adds extra attributes to the
[quoted text clipped - 4 lines]
> instruct your transformation engine and/or parser to not read the
> external subset. There is no way to achieve this using only XSLT.

Or change the DTD so that those attributes become optional instead of
compulsory.

///Peter
Signature

XML FAQ: http://xml.silmaril.ie/

mahesh.nimbalkar@gmail.com - 27 Mar 2007 23:43 GMT
I do not have control to that DTD. It is managed by one organization
for Book industry.

> > * mahesh.nimbal...@gmail.com wrote in microsoft.public.dotnet.xml:
> >> When I transform XML, XSLT automatically adds extra attributes to the
[quoted text clipped - 11 lines]
> --
> XML FAQ:http://xml.silmaril.ie/

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.