473,405 Members | 2,279 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Default attributes from DTD while transformation

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>an************@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>an************@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>

Mar 26 '07 #1
5 3889
* ma**************@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.
--
Björn Höhrmann · mailto:bj****@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/
Mar 27 '07 #2
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

On Mar 27, 4:45 am, Bjoern Hoehrmann <bjo...@hoehrmann.dewrote:
* mahesh.nimbal...@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.
--
Björn Höhrmann · mailto:bjo...@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/

Mar 27 '07 #3
Bjoern Hoehrmann wrote:
* ma**************@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.
Or change the DTD so that those attributes become optional instead of
compulsory.

///Peter
--
XML FAQ: http://xml.silmaril.ie/
Mar 27 '07 #4
I do not have control to that DTD. It is managed by one organization
for Book industry.

On Mar 27, 3:38 pm, Peter Flynn <peter.n...@m.silmaril.iewrote:
Bjoern Hoehrmann wrote:
* mahesh.nimbal...@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.

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

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

Mar 27 '07 #5
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

"ma**************@gmail.com" wrote:
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

On Mar 27, 4:45 am, Bjoern Hoehrmann <bjo...@hoehrmann.dewrote:
* mahesh.nimbal...@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.
--
Björn Höhrmann · mailto:bjo...@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/


Mar 30 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Wolfgang | last post by:
I'm applying a simple XSLT style sheet to an XML file. The style sheet is: http://piru.alexandria.ucsb.edu/~rnott/MetadataMapping/access-report.xsl The XML file is here: ...
2
by: wooks | last post by:
I apologise if this has been asked before, it is a bit hard to search for. I have an xml schema which defines the elements in the namespace "urn:dummy". The schema does not contain any...
3
by: Mike Dickens | last post by:
hi, i'm sure this has come up before but havn't managed to find an answer. if i have the following xslt <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet method="xml" version="1.0"...
1
by: Wayne Lian via .NET 247 | last post by:
Hi all, Just wonder anyone have encountered this problem before?I tried using XMLSPY debugger and I can get the correct outputfor my XSLT transformation, however in .net, aftertransformation the...
7
by: Bilal | last post by:
Hello all, I came across this problem while working out the bugs in my identity trasnformation stylesheets but sidestepped it for later to see if there is an easier/better solution. This is...
6
by: Jakub.Bednarczuk | last post by:
Hallo everybody I have the problem with getting attributes values and also attributes names. I am reading an xml file with DOM. Lets see an example: file I read <root> <Def></Def>...
6
by: Chris Chiasson | last post by:
Hi, After reading and experimenting for a several hours, I have this stylesheet: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"...
4
by: =?Utf-8?B?REZC?= | last post by:
Within an XSLT transformation, I'm trying to switch the default namespace within a section of the generated XML document to a shared namespace. This way, the content of this section does not have...
2
by: Bostonian | last post by:
I am loading an Xml from a physical file and passing it to XSL transformation. When i load the file (C# code), InnerXML shows backslash before all the XML attributes. Xsl transformation crashes...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.