2017-09-07 29 views
1

我只是想用xs3p生成一個schema的文檔。xs3p:處理include-tags

據我瞭解,問題是架構被拆分成幾個文件,並且xs3p沒有處理主文件的include-tags:結果是隻包含根元素的文檔。

我做了什麼?

  1. 我解壓xs3p下載到某個目錄
  2. 我複製的所有架構文件到該目錄
  3. 我叫saxonb,XSLT master.xsd xs3p.xsl> doku.html(Ubuntu下值得信賴的,如果有的話)

你能給我什麼幫助嗎?我認爲,有兩條線來解決這個問題:

  1. 製作xs3p過程中,包括標籤
  2. 集成所有XSD的文件到一個單一的一個 - 如何將這項工作?

提前致謝!

回答

1

你必須設置以下的xsl:PARAM在xs3p.xsl:

<!-- If 'true', searches 'included' schemas for schema components 
     when generating links and XML Instance Representation tables. --> 
    <xsl:param name="searchIncludedSchemas">true</xsl:param> 

    <!-- If 'true', searches 'imported' schemas for schema components 
     when generating links and XML Instance Representation tables. --> 
    <xsl:param name="searchImportedSchemas">true</xsl:param> 

    <!-- File containing the mapping from file locations of external 
     (e.g. included, imported, refined) schemas to file locations 
     of their XHTML documentation. --> 
    <xsl:param name="linksFile">xs3p_links.xml</xsl:param> 

你列入/導入的模式必須已變成了一個my_transformed_included_schema.html文件,你需要定義一個xs3p_links。 XML文件以一些進口/包括模式分配給他們的位置,如:

<?xml version="1.0"?> 
<links xmlns="http://titanium.dstc.edu.au/xml/xs3p"> 
     <schema file-location="my-included-schema.xsd" docfile-location="./my_transformed_included_schema.html"/> 
</links> 

希望這將幫助!

+0

謝謝你的幫助! – jetrca