473,761 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.d td">
<ONIXMessage>
<Header>
<FromEANNumber> 5013546111661</FromEANNumber>
<FromCompany>Ni elsenBookData</FromCompany>
<FromPerson>Ang ela Kendall</FromPerson>
<FromEmail>an** **********@niel senbookdata.co. uk</FromEmail>
<SentDate>20061 213</SentDate>
<DefaultLanguag eOfText>eng</DefaultLanguage OfText>
</Header>
<Product>
<RecordReferenc e>9780643091610 </RecordReference >
<NotificationTy pe>03</NotificationTyp e>
<RecordSourceTy pe>04</RecordSourceTyp e>
<RecordSourceNa me>Nielsen BookData</RecordSourceNam e>
<RecordSourceId entifierType>02 </RecordSourceIde ntifierType>
<RecordSourceId entifier>NBD</RecordSourceIde ntifier>
<ProductIdentif ier>
<ProductIDType> 15</ProductIDType>
<IDValue>978064 3091610</IDValue>
</ProductIdentifi er>
<ProductForm>BB </ProductForm>
<Title>
<TitleType>01 </TitleType>
<TitleText>Th e Nature of Plants</TitleText>
<TitlePrefix>Th e</TitlePrefix>
<TitleWithoutPr efix>Nature of Plants</TitleWithoutPre fix>
<Subtitle>Habit ats, Challenges and Adaptations</Subtitle>
</Title>
<Contributor>
<SequenceNumber >1</SequenceNumber>
<ContributorRol e>A01</ContributorRole >
<PersonName>Joh n Dawson</PersonName>
<PersonNameInve rted>Dawson, John</PersonNameInver ted>
<NamesBeforeKey >John</NamesBeforeKey>
<KeyNames>Dawso n</KeyNames>
</Contributor>
<Contributor>
<SequenceNumber >2</SequenceNumber>
<ContributorRol e>A01</ContributorRole >
<PersonName>R ob Lucas</PersonName>
<PersonNameInve rted>Lucas, Rob</PersonNameInver ted>
<NamesBeforeKey >Rob</NamesBeforeKey>
<KeyNames>Lucas </KeyNames>
</Contributor>
<EditionStateme nt>New title</EditionStatemen t>
<NumberOfPages> 314</NumberOfPages>
<IllustrationsN ote>colour photos &amp; illus</IllustrationsNo te>
<BASICMainSubje ct>GAR000000</BASICMainSubjec t>
<BASICVersion>B ISAC V2.8</BASICVersion>
<BICMainSubject >VG</BICMainSubject>
<BICVersion>1.1 </BICVersion>
<Subject>
<SubjectSchemeI dentifier>01</SubjectSchemeId entifier>
<SubjectSchemeV ersion>DC21</SubjectSchemeVe rsion>
<SubjectCode>63 5</SubjectCode>
</Subject>
<AudienceCode>0 1</AudienceCode>
<AudienceCode>0 5</AudienceCode>
<OtherText>
<TextTypeCode>0 2</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>0 2</NameCodeType>
<NameCodeTypeNa me>Nielsen BookData Org ID</NameCodeTypeNam e>
<NameCodeValue> 110001</NameCodeValue>
<ImprintName>CS IRO Publishing</ImprintName>
</Imprint>
<Publisher>
<NameCodeType>0 2</NameCodeType>
<NameCodeTypeNa me>Nielsen BookData Org ID</NameCodeTypeNam e>
<NameCodeValue> 110001</NameCodeValue>
<PublisherName> CSIRO Publishing</PublisherName>
</Publisher>
<CityOfPublicat ion>Melbourne</CityOfPublicati on>
<CountryOfPubli cation>AU</CountryOfPublic ation>
<PublishingStat us>04</PublishingStatu s>
<PublicationDat e>20050301</PublicationDate >
<SalesRights>
<SalesRightsTyp e>02</SalesRightsType >
<RightsCountry> AU NZ</RightsCountry>
</SalesRights>
<Measure>
<MeasureTypeCod e>01</MeasureTypeCode >
<Measurement>26 0</Measurement>
<MeasureUnitCod e>mm</MeasureUnitCode >
</Measure>
<Measure>
<MeasureTypeCod e>02</MeasureTypeCode >
<Measurement>18 5</Measurement>
<MeasureUnitCod e>mm</MeasureUnitCode >
</Measure>
<Measure>
<MeasureTypeCod e>08</MeasureTypeCode >
<Measurement>11 80</Measurement>
<MeasureUnitCod e>gr</MeasureUnitCode >
</Measure>
<SupplyDetail >
<SupplierName>S upplier Unknown</SupplierName>
<SupplierRole>0 0</SupplierRole>
<SupplyToCountr y>GB</SupplyToCountry >
<ProductAvailab ility>43</ProductAvailabi lity>
<Price>
<PriceTypeCode> 02</PriceTypeCode>
<PriceAmount>0. 50</PriceAmount>
<CurrencyCode>G BP</CurrencyCode>
<TaxRateCode1>Z </TaxRateCode1>
<TaxRatePercent 1>0.0</TaxRatePercent1 >
<TaxableAmount1 >0.50</TaxableAmount1>
<TaxAmount1>0.0 0</TaxAmount1>
</Price>
</SupplyDetail>
<SupplyDetail >
<SupplierIdenti fier>
<SupplierIDType >02</SupplierIDType>
<IDTypeName>Nie lsen BookData Org ID</IDTypeName>
<IDValue>7207 7</IDValue>
</SupplierIdentif ier>
<SupplierName>E urospan Group Ltd</SupplierName>
<SupplierRole>0 0</SupplierRole>
<SupplyToCountr y>GB</SupplyToCountry >
<ProductAvailab ility>99</ProductAvailabi lity>
<UnpricedItemTy pe>04</UnpricedItemTyp e>
</SupplyDetail>
<SupplyDetail >
<SupplierIdenti fier>
<SupplierIDType >02</SupplierIDType>
<IDTypeName>Nie lsen BookData Org ID</IDTypeName>
<IDValue>117189 </IDValue>
</SupplierIdentif ier>
<SupplierName>A ntipodes Books and Beyond</SupplierName>
<SupplierRole>0 0</SupplierRole>
<SupplyToCountr y>US</SupplyToCountry >
<ProductAvailab ility>99</ProductAvailabi lity>
<UnpricedItemTy pe>04</UnpricedItemTyp e>
</SupplyDetail>
<SupplyDetail >
<SupplierIdenti fier>
<SupplierIDType >02</SupplierIDType>
<IDTypeName>Nie lsen BookData Org ID</IDTypeName>
<IDValue>120778 </IDValue>
</SupplierIdentif ier>
<SupplierName>C SIRO Publishing</SupplierName>
<SupplierRole>0 0</SupplierRole>
<SupplyToCountr y>AU</SupplyToCountry >
<ProductAvailab ility>99</ProductAvailabi lity>
<UnpricedItemTy pe>04</UnpricedItemTyp e>
</SupplyDetail>
<SupplyDetail >
<SupplierIdenti fier>
<SupplierIDType >02</SupplierIDType>
<IDTypeName>Nie lsen BookData Org ID</IDTypeName>
<IDValue>114396 </IDValue>
</SupplierIdentif ier>
<SupplierName>U niversity and Reference Publishers' Services
(UNIREPS)</SupplierName>
<SupplierRole>0 0</SupplierRole>
<SupplyToCountr y>AU</SupplyToCountry >
<ProductAvailab ility>99</ProductAvailabi lity>
<UnpricedItemTy pe>04</UnpricedItemTyp e>
</SupplyDetail>
<SupplyDetail >
<SupplierIdenti fier>
<SupplierIDType >02</SupplierIDType>
<IDTypeName>Nie lsen BookData Org ID</IDTypeName>
<IDValue>123799 </IDValue>
</SupplierIdentif ier>
<SupplierName>M anaaki Whenua Press</SupplierName>
<SupplierRole>0 0</SupplierRole>
<SupplyToCountr y>NZ</SupplyToCountry >
<ProductAvailab ility>99</ProductAvailabi lity>
<UnpricedItemTy pe>04</UnpricedItemTyp e>
</SupplyDetail>
<SupplyDetail >
<SupplierIdenti fier>
<SupplierIDType >02</SupplierIDType>
<IDTypeName>Nie lsen BookData Org ID</IDTypeName>
<IDValue>114396 </IDValue>
</SupplierIdentif ier>
<SupplierName>U niversity and Reference Publishers' Services
(UNIREPS)</SupplierName>
<SupplierRole>0 0</SupplierRole>
<SupplyToCountr y>NZ</SupplyToCountry >
<ProductAvailab ility>99</ProductAvailabi lity>
<UnpricedItemTy pe>04</UnpricedItemTyp e>
</SupplyDetail>
<SupplyDetail >
<SupplierIdenti fier>
<SupplierIDType >02</SupplierIDType>
<IDTypeName>Nie lsen BookData Org ID</IDTypeName>
<IDValue>7207 7</IDValue>
</SupplierIdentif ier>
<SupplierName>E urospan Group Ltd</SupplierName>
<SupplierRole>0 0</SupplierRole>
<SupplyToCountr y>IE</SupplyToCountry >
<ProductAvailab ility>99</ProductAvailabi lity>
<UnpricedItemTy pe>04</UnpricedItemTyp e>
</SupplyDetail>
<MarketRepresen tation>
<AgentName>Univ ersity and Reference Publishers' Services
(UNIREPS)</AgentName>
<AgentRole>07 </AgentRole>
<MarketCountry> AU</MarketCountry>
</MarketRepresent ation>
</Product>
<Product>
</ONIXMessage>

-------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:styleshe et 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.d td"/>

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

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

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

<xsl:template match="Product" >
<Product>
<xsl:apply-templates select="RecordR eference"/>
<xsl:apply-templates select="Notific ationType"/>
<xsl:apply-templates select="RecordS ourceType"/>
<xsl:apply-templates select="RecordS ourceIdentifier Type"/>
<xsl:apply-templates select="RecordS ourceIdentifier "/>
<xsl:apply-templates select="RecordS ourceName"/>

<xsl:apply-templates select="node()
[
name(.) != 'RecordReferenc e'
and name(.) != 'NotificationTy pe'
and name(.) != 'RecordSourceTy pe'
and name(.) != 'RecordSourceId entifierType'
and name(.) != 'RecordSourceId entifier'
and name(.) != 'RecordSourceNa me'
]"/>
</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.d td">
<ONIXMessage>
<Header>
<FromEANNumber> 5013546111661</FromEANNumber>
<FromCompany>Ni elsenBookData</FromCompany>
<FromPerson>Ang ela Kendall</FromPerson>
<FromEmail>an** **********@niel senbookdata.co. uk</FromEmail>
<SentDate>20061 213</SentDate>
<DefaultLanguag eOfText>eng</DefaultLanguage OfText>
</Header>
<Product>
<RecordReferenc e>9780643091610 </RecordReference >
<NotificationTy pe>03</NotificationTyp e>
<RecordSourceTy pe>04</RecordSourceTyp e>
<RecordSourceId entifierType>02 </RecordSourceIde ntifierType>
<RecordSourceId entifier>NBD</RecordSourceIde ntifier>
<RecordSourceNa me>Nielsen BookData</RecordSourceNam e>
<ProductIdentif ier>
<ProductIDTyp e refname="Produc tIDType" shortname="b221 ">15</
ProductIDType>
<IDValue refname="IDValu e" shortname="b244 ">9780643091610 </
IDValue>
</ProductIdentifi er>
<ProductForm>BB </ProductForm>
<Title>
<TitleType refname="TitleT ype" shortname="b202 ">01</TitleType>
<TitleText refname="TitleT ext" shortname="b203 ">The Nature of
Plants</TitleText>
<TitlePrefix refname="TitleP refix" shortname="b030 ">The</
TitlePrefix>
<TitleWithoutPr efix refname="TitleW ithoutPrefix"
shortname="b031 ">Nature of Plants</TitleWithoutPre fix>
<Subtitle refname="Subtit le" shortname="b029 ">Habitats,
Challenges and Adaptations</Subtitle>
</Title>
<Contributor>
<SequenceNumb er refname="Sequen ceNumber" shortname="b034 ">1</
SequenceNumber>
<ContributorRol e refname="Contri butorRole" shortname="b035 ">A01</
ContributorRole >
<PersonName refname="Person Name" shortname="b036 ">John Dawson</
PersonName>
<PersonNameInve rted refname="Person NameInverted"
shortname="b037 ">Dawson, John</PersonNameInver ted>
<NamesBeforeK ey refname="NamesB eforeKey" shortname="b039 ">John</
NamesBeforeKey>
<KeyNames refname="KeyNam es" shortname="b040 ">Dawson</KeyNames>
</Contributor>
<Contributor>
<SequenceNumb er refname="Sequen ceNumber" shortname="b034 ">2</
SequenceNumber>
<ContributorRol e refname="Contri butorRole" shortname="b035 ">A01</
ContributorRole >
<PersonName refname="Person Name" shortname="b036 ">Rob Lucas</
PersonName>
<PersonNameInve rted refname="Person NameInverted"
shortname="b037 ">Lucas, Rob</PersonNameInver ted>
<NamesBeforeK ey refname="NamesB eforeKey" shortname="b039 ">Rob</
NamesBeforeKey>
<KeyNames refname="KeyNam es" shortname="b040 ">Lucas</KeyNames>
</Contributor>
<EditionStateme nt>New title</EditionStatemen t>
<NumberOfPages> 314</NumberOfPages>
<IllustrationsN ote>colour photos &amp; illus</IllustrationsNo te>
<BASICMainSubje ct>GAR000000</BASICMainSubjec t>
<BASICVersion>B ISAC V2.8</BASICVersion>
<BICMainSubject >VG</BICMainSubject>
<BICVersion>1.1 </BICVersion>
<Subject>
<SubjectSchemeI dentifier refname="Subjec tSchemeIdentifi er"
shortname="b067 ">01</SubjectSchemeId entifier>
<SubjectSchemeV ersion refname="Subjec tSchemeVersion"
shortname="b068 ">DC21</SubjectSchemeVe rsion>
<SubjectCode refname="Subjec tCode" shortname="b069 ">635</
SubjectCode>
</Subject>
<AudienceCode>0 1</AudienceCode>
<AudienceCode>0 5</AudienceCode>
<OtherText>
<TextTypeCode refname="TextTy peCode" 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="NameCo deType" shortname="b241 ">02</
NameCodeType>
<NameCodeTypeNa me refname="NameCo deTypeName"
shortname="b242 ">Nielsen BookData Org ID</NameCodeTypeNam e>
<NameCodeValu e refname="NameCo deValue" shortname="b243 ">110001</
NameCodeValue>
<ImprintName refname="Imprin tName" shortname="b079 ">CSIRO
Publishing</ImprintName>
</Imprint>
<Publisher>
<NameCodeType refname="NameCo deType" shortname="b241 ">02</
NameCodeType>
<NameCodeTypeNa me refname="NameCo deTypeName"
shortname="b242 ">Nielsen BookData Org ID</NameCodeTypeNam e>
<NameCodeValu e refname="NameCo deValue" shortname="b243 ">110001</
NameCodeValue>
<PublisherNam e refname="Publis herName" shortname="b081 ">CSIRO
Publishing</PublisherName>
</Publisher>
<CityOfPublicat ion>Melbourne</CityOfPublicati on>
<CountryOfPubli cation>AU</CountryOfPublic ation>
<PublishingStat us>04</PublishingStatu s>
<PublicationDat e>20050301</PublicationDate >
<SalesRights>
<SalesRightsTyp e refname="SalesR ightsType" shortname="b089 ">02</
SalesRightsType >
<RightsCountr y refname="Rights Country" shortname="b090 ">AU NZ</
RightsCountry>
</SalesRights>
<Measure>
<MeasureTypeCod e refname="Measur eTypeCode" shortname="c093 ">01</
MeasureTypeCode >
<Measurement refname="Measur ement" shortname="c094 ">260</
Measurement>
<MeasureUnitCod e refname="Measur eUnitCode" shortname="c095 ">mm</
MeasureUnitCode >
</Measure>
<Measure>
<MeasureTypeCod e refname="Measur eTypeCode" shortname="c093 ">02</
MeasureTypeCode >
<Measurement refname="Measur ement" shortname="c094 ">185</
Measurement>
<MeasureUnitCod e refname="Measur eUnitCode" shortname="c095 ">mm</
MeasureUnitCode >
</Measure>
<Measure>
<MeasureTypeCod e refname="Measur eTypeCode" shortname="c093 ">08</
MeasureTypeCode >
<Measurement refname="Measur ement" shortname="c094 ">1180</
Measurement>
<MeasureUnitCod e refname="Measur eUnitCode" shortname="c095 ">gr</
MeasureUnitCode >
</Measure>
<SupplyDetail >
<SupplierName refname="Suppli erName" shortname="j137 ">Supplier
Unknown</SupplierName>
<SupplierRole refname="Suppli erRole" shortname="j292 ">00</
SupplierRole>
<SupplyToCountr y refname="Supply ToCountry" shortname="j138 ">GB</
SupplyToCountry >
<ProductAvailab ility refname="Produc tAvailability"
shortname="j396 ">43</ProductAvailabi lity>
<Price refname="Price" shortname="pric e">
<PriceTypeCod e refname="PriceT ypeCode" shortname="j148 ">02</
PriceTypeCode>
<PriceAmount refname="PriceA mount" shortname="j151 ">0.50</
PriceAmount>
<CurrencyCode refname="Curren cyCode" shortname="j152 ">GBP</
CurrencyCode>
<TaxRateCode1 refname="TaxRat eCode1" shortname="j153 ">Z</
TaxRateCode1>
<TaxRatePercent 1 refname="TaxRat ePercent1"
shortname="j154 ">0.0</TaxRatePercent1 >
<TaxableAmoun t1 refname="Taxabl eAmount1"
shortname="j155 ">0.50</TaxableAmount1>
<TaxAmount1 refname="TaxAmo unt1" shortname="j156 ">0.00</
TaxAmount1>
</Price>
</SupplyDetail>
<SupplyDetail >
<SupplierIdenti fier refname="Suppli erIdentifier"
shortname="supp lieridentifier" >
<SupplierIDTy pe refname="Suppli erIDType" shortname="j345 ">02</
SupplierIDType>
<IDTypeName refname="IDType Name" shortname="b233 ">Nielsen
BookData Org ID</IDTypeName>
<IDValue refname="IDValu e" shortname="b244 ">72077</IDValue>
</SupplierIdentif ier>
<SupplierName refname="Suppli erName" shortname="j137 ">Eurospan
Group Ltd</SupplierName>
<SupplierRole refname="Suppli erRole" shortname="j292 ">00</
SupplierRole>
<SupplyToCountr y refname="Supply ToCountry" shortname="j138 ">GB</
SupplyToCountry >
<ProductAvailab ility refname="Produc tAvailability"
shortname="j396 ">99</ProductAvailabi lity>
<UnpricedItemTy pe refname="Unpric edItemType"
shortname="j192 ">04</UnpricedItemTyp e>
</SupplyDetail>
<SupplyDetail >
<SupplierIdenti fier refname="Suppli erIdentifier"
shortname="supp lieridentifier" >
<SupplierIDTy pe refname="Suppli erIDType" shortname="j345 ">02</
SupplierIDType>
<IDTypeName refname="IDType Name" shortname="b233 ">Nielsen
BookData Org ID</IDTypeName>
<IDValue refname="IDValu e" shortname="b244 ">117189</IDValue>
</SupplierIdentif ier>
<SupplierName refname="Suppli erName" shortname="j137 ">Antipodes
Books and Beyond</SupplierName>
<SupplierRole refname="Suppli erRole" shortname="j292 ">00</
SupplierRole>
<SupplyToCountr y refname="Supply ToCountry" shortname="j138 ">US</
SupplyToCountry >
<ProductAvailab ility refname="Produc tAvailability"
shortname="j396 ">99</ProductAvailabi lity>
<UnpricedItemTy pe refname="Unpric edItemType"
shortname="j192 ">04</UnpricedItemTyp e>
</SupplyDetail>
<SupplyDetail >
<SupplierIdenti fier refname="Suppli erIdentifier"
shortname="supp lieridentifier" >
<SupplierIDTy pe refname="Suppli erIDType" shortname="j345 ">02</
SupplierIDType>
<IDTypeName refname="IDType Name" shortname="b233 ">Nielsen
BookData Org ID</IDTypeName>
<IDValue refname="IDValu e" shortname="b244 ">120778</IDValue>
</SupplierIdentif ier>
<SupplierName refname="Suppli erName" shortname="j137 ">CSIRO
Publishing</SupplierName>
<SupplierRole refname="Suppli erRole" shortname="j292 ">00</
SupplierRole>
<SupplyToCountr y refname="Supply ToCountry" shortname="j138 ">AU</
SupplyToCountry >
<ProductAvailab ility refname="Produc tAvailability"
shortname="j396 ">99</ProductAvailabi lity>
<UnpricedItemTy pe refname="Unpric edItemType"
shortname="j192 ">04</UnpricedItemTyp e>
</SupplyDetail>
<SupplyDetail >
<SupplierIdenti fier refname="Suppli erIdentifier"
shortname="supp lieridentifier" >
<SupplierIDTy pe refname="Suppli erIDType" shortname="j345 ">02</
SupplierIDType>
<IDTypeName refname="IDType Name" shortname="b233 ">Nielsen
BookData Org ID</IDTypeName>
<IDValue refname="IDValu e" shortname="b244 ">114396</IDValue>
</SupplierIdentif ier>
<SupplierName refname="Suppli erName" shortname="j137 ">Universit y
and Reference Publishers' Services (UNIREPS)</SupplierName>
<SupplierRole refname="Suppli erRole" shortname="j292 ">00</
SupplierRole>
<SupplyToCountr y refname="Supply ToCountry" shortname="j138 ">AU</
SupplyToCountry >
<ProductAvailab ility refname="Produc tAvailability"
shortname="j396 ">99</ProductAvailabi lity>
<UnpricedItemTy pe refname="Unpric edItemType"
shortname="j192 ">04</UnpricedItemTyp e>
</SupplyDetail>
<SupplyDetail >
<SupplierIdenti fier refname="Suppli erIdentifier"
shortname="supp lieridentifier" >
<SupplierIDTy pe refname="Suppli erIDType" shortname="j345 ">02</
SupplierIDType>
<IDTypeName refname="IDType Name" shortname="b233 ">Nielsen
BookData Org ID</IDTypeName>
<IDValue refname="IDValu e" shortname="b244 ">123799</IDValue>
</SupplierIdentif ier>
<SupplierName refname="Suppli erName" shortname="j137 ">Manaaki
Whenua Press</SupplierName>
<SupplierRole refname="Suppli erRole" shortname="j292 ">00</
SupplierRole>
<SupplyToCountr y refname="Supply ToCountry" shortname="j138 ">NZ</
SupplyToCountry >
<ProductAvailab ility refname="Produc tAvailability"
shortname="j396 ">99</ProductAvailabi lity>
<UnpricedItemTy pe refname="Unpric edItemType"
shortname="j192 ">04</UnpricedItemTyp e>
</SupplyDetail>
<SupplyDetail >
<SupplierIdenti fier refname="Suppli erIdentifier"
shortname="supp lieridentifier" >
<SupplierIDTy pe refname="Suppli erIDType" shortname="j345 ">02</
SupplierIDType>
<IDTypeName refname="IDType Name" shortname="b233 ">Nielsen
BookData Org ID</IDTypeName>
<IDValue refname="IDValu e" shortname="b244 ">114396</IDValue>
</SupplierIdentif ier>
<SupplierName refname="Suppli erName" shortname="j137 ">Universit y
and Reference Publishers' Services (UNIREPS)</SupplierName>
<SupplierRole refname="Suppli erRole" shortname="j292 ">00</
SupplierRole>
<SupplyToCountr y refname="Supply ToCountry" shortname="j138 ">NZ</
SupplyToCountry >
<ProductAvailab ility refname="Produc tAvailability"
shortname="j396 ">99</ProductAvailabi lity>
<UnpricedItemTy pe refname="Unpric edItemType"
shortname="j192 ">04</UnpricedItemTyp e>
</SupplyDetail>
<SupplyDetail >
<SupplierIdenti fier refname="Suppli erIdentifier"
shortname="supp lieridentifier" >
<SupplierIDTy pe refname="Suppli erIDType" shortname="j345 ">02</
SupplierIDType>
<IDTypeName refname="IDType Name" shortname="b233 ">Nielsen
BookData Org ID</IDTypeName>
<IDValue refname="IDValu e" shortname="b244 ">72077</IDValue>
</SupplierIdentif ier>
<SupplierName refname="Suppli erName" shortname="j137 ">Eurospan
Group Ltd</SupplierName>
<SupplierRole refname="Suppli erRole" shortname="j292 ">00</
SupplierRole>
<SupplyToCountr y refname="Supply ToCountry" shortname="j138 ">IE</
SupplyToCountry >
<ProductAvailab ility refname="Produc tAvailability"
shortname="j396 ">99</ProductAvailabi lity>
<UnpricedItemTy pe refname="Unpric edItemType"
shortname="j192 ">04</UnpricedItemTyp e>
</SupplyDetail>
<MarketRepresen tation>
<AgentName refname="AgentN ame" shortname="j401 ">Universit y and
Reference Publishers' Services (UNIREPS)</AgentName>
<AgentRole refname="AgentR ole" shortname="j402 ">07</AgentRole>
<MarketCountr y refname="Market Country" shortname="j403 ">AU</
MarketCountry>
</MarketRepresent ation>
</Product>

Mar 26 '07 #1
5 3908
* ma************* *@gmail.com wrote in microsoft.publi c.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****@h oehrmann.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(x mlInputFile)
Dim transform As New XslCompiledTran sform()
Dim results As Stream = Nothing

Try
results = File.Create(xml OutputFile)

Dim argsList As New XsltArgumentLis t()
Dim dateAndTime As New MyDateTime()
argsList.AddExt ensionObject("u rn:MyDateTime", dateAndTime)

transform.Load( xslInputFile)
transform.Trans form(xPathDoc, argsList, results)

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

On Mar 27, 4:45 am, Bjoern Hoehrmann <bjo...@hoehrma nn.dewrote:
* mahesh.nimbal.. .@gmail.com wrote in microsoft.publi c.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...@h oehrmann.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.publi c.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.s ilmaril.iewrote :
Bjoern Hoehrmann wrote:
* mahesh.nimbal.. .@gmail.com wrote in microsoft.publi c.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(x mlInputFile)
reader.XmlResol ver = null
Dim xPathDoc As New XPathDocument(r eader)

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(x mlInputFile)
Dim transform As New XslCompiledTran sform()
Dim results As Stream = Nothing

Try
results = File.Create(xml OutputFile)

Dim argsList As New XsltArgumentLis t()
Dim dateAndTime As New MyDateTime()
argsList.AddExt ensionObject("u rn:MyDateTime", dateAndTime)

transform.Load( xslInputFile)
transform.Trans form(xPathDoc, argsList, results)

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

On Mar 27, 4:45 am, Bjoern Hoehrmann <bjo...@hoehrma nn.dewrote:
* mahesh.nimbal.. .@gmail.com wrote in microsoft.publi c.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...@h oehrmann.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
2717
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: http://piru.alexandria.ucsb.edu/~rnott/MetadataMapping/dlese-adn.xml This works fine as long as the root element of the XML file is plain
2
2285
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 attribute definitions/declarations. The instance XML however gets transformed at runtime with the result that a label attribute is added to each element.
3
10043
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" xmlns:ns1="abc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="yes" media-type="text/xml" standalone="yes" version="1.0"/> <xsl:template match="/">
1
1797
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 attributes I put inside xsl:element tagcannot be generated. Part of the XML data: <?xml version="1.0" encoding="utf-8"?> <receipients> <receipient> ... <ServerUrl>http://win2003p2/</ServerUrl>...
7
1845
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 essentially following up to my last post so apologies for repeating parts of the post. The transformation stylesheet is (after corrections from kind contributors :) <?xml version="1.0" encoding="UTF-8"?>
6
1901
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> <Elements> <Element att1="1" att2="2" att3="3" //Some attributes are
6
2065
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" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xmlns="http://www.w3.org/2000/xmlns/" xmlns:mathematica="http://www.wolfram.com/XML/" version="1.0">
4
4314
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 to use a prefix for the shared namespace, thus making the document smaller and easier to read. This worked in .NET 1.1 with no problem, but now appears to be broken in 2.0. When you try to do this, the following XslTransformException is...
2
2208
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 because of it. However the physical file (xml) has no backslash before the attributes. Here is the code: string strinputfile=System.Configuration.ConfigurationSettings.AppSettings; doc.Load(strinputfile);
0
9554
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9377
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9989
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9811
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7358
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3913
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.