2016-05-05 11 views
1

私のXMLショートタグファイルはONIX xmlの短縮タグ名を参照タグ名に変換するには?

<product> 
<a001>CRITICAL-62258</a001 
><a002>01</a002> 
<productidentifier> 
<b221>03</b221> 
<b244>9781911106050</b244> 
</productidentifier> 
<productidentifier> 
<b221>15</b221> 
<b244>9781911106050</b244> 
</productidentifier> 
<b012>DG</b012> 
<b385>10</b385> 
<b211>002</b211> 
<series> 
<seriesidentifier> 
<b273>01</b273> 
<b233>Publishers Code</b233> 
<b244>181</b244> 
</seriesidentifier> 
<b018>Critical Teaching</b018> 
</series> 
<title> 
<b202>01</b202> 
<b203>Creative Approaches to the Curriculum in Primary Foreign Languages</b203> 
</title> 
<workidentifier> 
<b201>01</b201> 
<b233>critical.stisontest.co.uk Content ID</b233> 
<b244>48452</b244> 
</workidentifier> 
<contributor> 
<b034>1</b034> 
<b035>A01</b035> 
<b036>Louise Pagden</b036> 
<b037>Pagden, Louise</b037> 
<b039>Louise</b039> 
<b040>Pagden</b040> 
<personnameidentifier> 
<b390>01</b390> 
<b233>www.stisonbooks.com Author ID</b233> 
<b244>44217</b244> 
</personnameidentifier> 
<b044><p><strong>Louise Pagden is a senior lecturer in teacher development at the University of Winchester where she lectures in primary languages. She has many years of experience in this field, first as a primary school teacher and languages subject leader and later as a primary languages consultant in Hampshire. During her time there she was involved in the implementation of primary languages in the 350 primary schools in the county. Louise has taught in Spain, Argentina, Mexico and India. Her research interests lie in immersion teaching and content and language integrated learning. </strong></p></b044> 
</contributor> 
<n386/> 
<b061>192</b061> 
<b064>EDU029000</b064> 
<b200>2</b200> 
<b065>JNU</b065> 
<b066>2.1</b066> 
<subject> 
<b067>12</b067> 
<b068>2.1</b068> 
<b069>JNMT</b069> 
<b070>Teacher training</b070> 
</subject> 
<subject> 
<b067>12</b067> 
<b068>2.1</b068> 
<b069>JNT</b069> 
<b070>Teaching skills & techniques</b070> 
</subject> 
<subject> 
<b067>23</b067> 
<b069>PFL</b069> 
<b070>Primary Foreign Languages</b070> 
</subject> 
<subject> 
<b067>23</b067> 
<b069>ED</b069> 
<b070>Education</b070> 
</subject> 
<subject> 
<b067>23</b067> 
<b069>PR</b069> 
<b070>Primary</b070> 
</subject> 
<subject> 
<b067>20</b067> 
<b070>Primary languages; Language teaching; Foreign languages</b070> 
</subject> 
<b073>06</b073> 
<b073>09</b073> 
<othertext> 
<d102>01</d102> 
<d103>02</d103> 
<d104><p>This book enables trainee and qualified teachers to embrace a more creative approach to primary language teaching. The first part of the book focuses on key language skills, including reading, writing, speaking, listening, grammar and phonics, while the second part examines a range of different pedagogical approaches to language teaching, including flipped learning, CLIL, ICT and overseas partnerships. Each chapter includes links to the national curriculum objectives and the Key Stage 2 framework for languages, notes on progression and assessment, implications for transition and a detailed case study demonstrating the skill or approach in practice. In addition the text critically explores up-to-date theory and research, making clear links between theory and practice. </p> 
</d104></othertext> 
<othertext><d102>02</d102><d103>02</d103><d104><p>An up to date text for trainee and qualified primary teachers promoting a more creative approach to primary language teaching. </p> 
</d104></othertext> 
<othertext> 
<d102>04</d102><d104><p><em>Glossary</em></p> 
<p><em>Introduction</em></p> 
<p><strong>PART 1: Key skills</strong></p> 
<p><span>1. Speaking and listening</span></p> 
<p><span>2. Reading </span></p> 
<p><span>3. Writing</span></p> 
<p><span>4. Getting to grips with grammar</span></p> 
<p><span>5. Phonics</span></p> 
<p><strong>PART 2: Contexts for learning</strong></p> 
<p><span>6. Cross-curricular links: music and arts; drama and role play</span></p> 
<p><span>7. CLIL and immersion</span></p> 
<p><span>8. Languages in the digital age</span></p> 
<p><span>9. Enquiry based learning</span></p> 
<p><span>10. Partnerships and exchanges</span></p> 
<p><em>Key websites and sources of support</em></p> 
<p><em>Bibliography</em></p> 
<p><em>Index</em></p> 
</d104> 
</othertext> 
<othertext> 
<d102>18</d102> 
<d104> 
<p>This book enables trainee and qualified teachers to embrace a more creative approach to primary language teaching. The first part of the book focuses on key language skills, including reading, writing, speaking, listening, grammar and phonics, while the second part examines a range of different pedagogical approaches to language teaching, including flipped learning, CLIL, ICT and overseas partnerships. Each chapter includes links to the national curriculum objectives and the Key Stage 2 framework for languages, notes on progression and assessment, implications for transition and a detailed case study demonstrating the skill or approach in practice. In addition the text critically explores up-to-date theory and research, making clear links between theory and practice. </p> 
</d104> 
</othertext> 
<productwebsite> 
<b367>01</b367> 
<f123>www.criticalpublishing.com</f123> 
</productwebsite> 
<imprint> 
<b241>02</b241> 
<b242>Proprietary</b242> 
<b243>CPC</b243> 
<b079>Critical Publishing</b079> 
</imprint> 
<publisher> 
<b291>01</b291> 
<b081>Critical Publishing</b081> 
</publisher> 
<b209>Northwich</b209> 
<b083>GB</b083> 
<b394>02</b394> 
<b003>20170120</b003> 
<salesrights> 
<b089>01</b089> 
<b388>WORLD</b388> 
</salesrights> 
<relatedproduct> 
<h208>06</h208> 
<productidentifier> 
<b221>15</b221> 
<b244>9781911106036</b244> 
</productidentifier> 
</relatedproduct> 
<relatedproduct> 
<h208>06</h208> 
<productidentifier> 
<b221>15</b221> 
<b244>9781911106043</b244> 
</productidentifier> 
</relatedproduct> 
<relatedproduct> 
<h208>13</h208> 
<productidentifier> 
<b221>15</b221> 
<b244>9781911106029</b244> 
</productidentifier> 
</relatedproduct> 
<supplydetail> 
<j137>NBN International</j137> 
<j396>10</j396> 
<j142>20170113</j142> 
<price> 
<j148>01</j148> 
<j151>26.00</j151> 
<j152>EUR</j152> 
</price> 
<price> 
<j148>02</j148> 
<j151>22.00</j151> 
<j152>GBP</j152> 
<j153>S</j153> 
<j154>20.0</j154> 
<j155>18.50</j155> 
<j156>3.50</j156> 
</price> 
</supplydetail> 
<supplydetail> 
<j137>International Specialized Book Services</j137> 
<j270>1-800-944-6190</j270><j272>[email protected]</j272> 
<j138>US</j138> 
<j396>10</j396> 
<j142>20170113</j142> 
<price> 
<j148>01</j148> 
<j151>33.00</j151> 
<j152>USD</j152> 
</price> 
</supplydetail> 
</product> 

私は、タグ名を参照するように、この短いタグ名を変換します。短いタグ名に変換するにはこれを試しました

私は1つのフォルダを作成し、xmlファイルとjarファイルを配置しました。変換のために私はSaxon.jarという名前の瓶を見つけました。私は私のファイルを置いたどこにでも来て、私のコマンドプロンプトを開いた。

E:\ Arunselvan>のjava -jar saxon9.jar "criticalonix.xml" スイッチ-ONIX-タグ名-2.0.xsl結果、文書= "" DTDパス= "ONIX_BookProduct_3.0_reference.dtd" 私が与えた場合このエラーは私のために来るでしょう:悪いparam =コマンドライン上の値のペア。私はこの

私のスクリーンショットを使用してコマンドプロンプト画像を配置 はScreenshot of short tag to reference tag conversion

は、私はあなたがスタイルシートを使用したいと仮定すると、

<Product> 
     <RecordReference>1512722278</RecordReference> 
     <NotificationType>04</NotificationType> 
     <ProductIdentifier> 
     <ProductIDType>02</ProductIDType> 
     <IDValue>1512722278</IDValue> 
     </ProductIdentifier> 
     <ProductIdentifier> 
     <ProductIDType>03</ProductIDType> 
     <IDValue>9781512722277</IDValue> 
     </ProductIdentifier> 
     <ProductIdentifier> 
     <ProductIDType>15</ProductIDType> 
     <IDValue>9781512722277</IDValue> 
     </ProductIdentifier> 
     <ProductForm>BC</ProductForm> 
     <ProductFormDetail>B102</ProductFormDetail> 
     <ProductFormFeature> 
     <ProductFormFeatureType>02</ProductFormFeatureType> 
     <ProductFormFeatureDescription>CRE</ProductFormFeatureDescription> 
     </ProductFormFeature> 
     <TitleDetail> 
     <TitleType>01</TitleType> 
     <TitleElement> 
      <TitleElementLevel>01</TitleElementLevel> 
      <TitleText>Everyday Evangelism</TitleText> 
      <SubTitle> Practical Tips to Use Today</SubTitle> 
     </TitleElement> 
     </TitleDetail> 
     <Contributor> 
     <SequenceNumber>1</SequenceNumber> 
     <ContributorRole>A01</ContributorRole> 
     <PersonName>Laura Yang </PersonName> 
     <PersonNameInverted>Yang, Laura</PersonNameInverted> 
     <NamesBeforeKey>Laura </NamesBeforeKey> 
     <KeyNames>Yang</KeyNames> 
     </Contributor> 
     <EditionVersionNumber>20160205204457</EditionVersionNumber> 
     <Language> 
     <LanguageRole>01</LanguageRole> 
     <LanguageCode>eng</LanguageCode> 
     </Language> 
     <NumberOfPages>96</NumberOfPages> 
     <Illustrations> 
     <IllustrationType>01</IllustrationType> 
     <IllustrationTypeDescription>1:B&amp;amp;W 5.5 x 8.5 in or 216 x 140 mm (Demy 8vo) Perfect Bound on Creme w/Gloss Lam</IllustrationTypeDescription> 
     </Illustrations> 
     <Subject> 
     <MainSubject /> 
     <SubjectSchemeIdentifier>10</SubjectSchemeIdentifier> 
     <SubjectCode>REL012070</SubjectCode> 
     <SubjectHeadingText>Religion : Christian Life - Personal Growth</SubjectHeadingText> 
     </Subject> 
     <Subject> 
     <SubjectSchemeIdentifier>10</SubjectSchemeIdentifier> 
     <SubjectCode>REL012100</SubjectCode> 
     <SubjectHeadingText>Religion : Christian Life - Relationships</SubjectHeadingText> 
     </Subject> 
     <Subject> 
     <SubjectSchemeIdentifier>10</SubjectSchemeIdentifier> 
     <SubjectCode>REL012120</SubjectCode> 
     <SubjectHeadingText>Religion : Christian Life - Spiritual Growth</SubjectHeadingText> 
     </Subject> 
     <TextContent> 
     <TextType>03</TextType> 
     <ContentAudience>00</ContentAudience> 
     <Text textformat="02"><![CDATA[<p>Written by an "everyday" Christian, this book contains simple, straightforward suggestions for sharing your faith. Everyday Evangelism empowers you to tell others about Christ today.<p> 

<p>Discover new ideas and practical ways to share the gospel in your daily life. Interspersed with scripture, the tips are grouped into eleven categories-for example: "Super Simple," "Critical Conversation," and "Often-Forgotten."<p> 

<p>Experience the exhilarating joy that God intends for you by sharing the gospel. Use Everyday Evangelism as a tool to unleash the power of the Holy Spirit within you to "go and make disciples of all nations" (Matthew 28:19).</p>]]></Text> 
     </TextContent> 
     <SupportingResource> 
     <ResourceContentType>01</ResourceContentType> 
     <ContentAudience>00</ContentAudience> 
     <ResourceMode>03</ResourceMode> 
     <ResourceVersion> 
      <ResourceForm>02</ResourceForm> 
      <ResourceVersionFeature> 
       <ResourceVersionFeatureType>01</ResourceVersionFeatureType> 
       <FeatureValue>D502</FeatureValue> 
      </ResourceVersionFeature> 
     </ResourceVersion> 
     <ResourceLink>http://image-hub.lightningsource.com/2011-04-01/Images/front_cover/x/sku/1512722278.jpg</ResourceLink> 
     </SupportingResource> 
     <SupportingResource> 
     <ResourceContentType>02</ResourceContentType> 
     <ContentAudience>00</ContentAudience> 
     <ResourceMode>03</ResourceMode> 
     <ResourceVersion> 
      <ResourceForm>02</ResourceForm> 
      <ResourceVersionFeature> 
       <ResourceVersionFeatureType>01</ResourceVersionFeatureType> 
       <FeatureValue>D502</FeatureValue> 
      </ResourceVersionFeature> 
     </ResourceVersion> 
     <ResourceLink>http://image-hub.lightningsource.com/2011-04-01/Images/back_cover/x/sku/1512722278.jpg</ResourceLink> 
     </SupportingResource> 
     <PublishingDetail> 
     <Imprint> 
      <ImprintName>Westbow Press</ImprintName> 
     </Imprint> 
     <Publisher> 
      <PublisherName>AuthorHouse</PublisherName> 
     </Publisher> 
     </PublishingDetail> 
     <PublishingDate> 
     <PublishingDateRole>01</PublishingDateRole> 
     <DateFormat>00</DateFormat> 
     <Date>20160205</Date> 
     </PublishingDate> 
     <Measure> 
     <MeasureType>01</MeasureType> 
     <Measurement>8.50</Measurement> 
     <MeasureUnitCode>in</MeasureUnitCode> 
     </Measure> 
     <Measure> 
     <MeasureType>02</MeasureType> 
     <Measurement>5.50</Measurement> 
     <MeasureUnitCode>in</MeasureUnitCode> 
     </Measure> 
     <Measure> 
     <MeasureType>03</MeasureType> 
     <Measurement>0.23</Measurement> 
     <MeasureUnitCode>in</MeasureUnitCode> 
     </Measure> 
     <Measure> 
     <MeasureType>08</MeasureType> 
     <Measurement>0.294</Measurement> 
     <MeasureUnitCode>lb</MeasureUnitCode> 
     </Measure> 
     <ProductSupply> 
     <Market> 
      <Territory> 
       <CountriesIncluded>IN</CountriesIncluded> 
      </Territory> 
      <SupplyDetail> 
       <Supplier> 
        <SupplierRole>07</SupplierRole> 
        <SupplierName>Lightning Source Inc.</SupplierName> 
       </Supplier> 
       <ReturnsConditions> 
        <ReturnsCodeType>02</ReturnsCodeType> 
        <ReturnsCode>N</ReturnsCode> 
       </ReturnsConditions> 
       <ProductAvailability>20</ProductAvailability> 
       <SupplyDate> 
        <SupplyDateRole>08</SupplyDateRole> 
        <DateFormat>00</DateFormat> 
        <Date>20160205</Date> 
       </SupplyDate> 
       <Stock> 
        <PackQuantity>72</PackQuantity> 
       </Stock> 
       <Price> 
        <PriceType>01</PriceType> 
        <DiscountCoded> 
        <DiscountCodeType>02</DiscountCodeType> 
        <DiscountCodeTypeName>LSI</DiscountCodeTypeName> 
        <DiscountCode>36</DiscountCode> 
        </DiscountCoded> 
        <PriceAmount>9.95</PriceAmount> 
        <CurrencyCode>USD</CurrencyCode> 
       </Price> 
      </SupplyDetail> 
     </Market> 
     </ProductSupply> 
    </Product> 

答えて

0

タグ名このリファレンスなどの出力ファイルをしたいここにあるhttp://www.editeur.org/files/ONIX%203/switch-onix-tagnames-2.0.xslいくつかのパラメータを取るかのように見え、result-documentという名前のファイルが結果ファイルの名前になっているので、その名前を決定して渡す必要があります。結果ファイル名として空の文字列は機能しません。

だから、等号は、Windowsのコマンドラインで( "=")に署名する前と後のあなたは空白を持つことはできません)

java -jar saxon9.jar criticalonix.xml switch-onix-tagnames-2.0.xsl result-document=result.xml dtd-path=ONIX_BookProduct_3.0_reference.dtd 
+0

私はこれを私のコンソールで試しました。エラーとしてメッセージを表示します。ファイル:変換に失敗しました:実行時エラーが報告されました – Arunselvan

+0

作業しているドキュメントフォーマットに慣れていないことが懸念されます。スタイルシートは、入力XMLのパラメータと値に基づいてDTD URIを作成しようとしますが、あなたが持っているフォーマットや必要なフォーマットに適切な値や必要な値がわかりません。私の答えは主にSaxonの使用を示すことを意図しています。うまくいけば、 'onyx'タグが正しいDTDを手助けすることができます。 –

+0

editeur.orgでホストされているDTDは、もはや(2014年末から)使用することはできませんが、ローカルサーバー上で独自のDTDをセットアップする必要があります。どのようにここで見つけることができるかに関する指示:http://www.editeur.org/files/ONIX%202.1/ONIX_2.1_local_DTD_and_XSD_instructions.pdf –

1

1を試してみてください。だから、あなたの入力XMLがあるアンパサンド(&)が含まれて)あなたが "悪いPARAM = valueのペア" エラー

2を得る理由です

dtd-path="ONIX_BookProduct_3.0_reference.dtd" 

ではなく

dtd-path ="ONIX_BookProduct_3.0_reference.dtd" 

する必要がありますXML形式の予約文字。 &amp;エンティティに置き換えてください

3)明らかに、このDTDはこのアドレスに見つかりません。あなたは、すべての必要なDTDをダウンロードする必要があります。

  • ONIX_BookProduct_3.0_reference.dtd
  • ONIX_BookProduct_CodeLists.dtd
  • ONIX_XHTML_Subset.dtd
  • 例えば見つけることができます

ここで: http://www.editeur.org/files/ONIX%203/ONIX_BookProduct_DTDs+codes_Issue_33.zip

そして、DTD宣言のローカルファイルを指すことができます。 は、私はまた、あなたの入力ファイルはDTD宣言とONIXのリリース情報が含まれているべきだと思う:

<?xml version=1.0 encoding=UTF-8"?> 
<!DOCTYPE ONIXmessage SYSTEM "ONIX_BookProduct_3.0_reference.dtd"> 
<ONIXmessage release="3.0"> 
... 
(your original XML short tag input) 
... 
</ONIXmessage> 

この宣言は、同じディレクトリにDTDをアンパックと仮定が正しいです。

関連する問題