DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> XML學習教程 >> XML基礎 >> XSL對象格式使用指南(三)
XSL對象格式使用指南(三)
編輯:XML基礎     

 

在前兩篇中我們已經討論了怎樣處理封面頁和內容頁,現在我們准備把以下內容放入這西班牙評論手冊裡。
  
  
  標題和段落屬性由<fo:block> 元素控制,粗體和帶下劃線的詞語由<fo:inline>元素控制。現在開始描述第一個標題:
  <fo:block
  
  font-size="14pt" font-family="sans-serif"
  font-weight="bold" color="green"
  space-before="6pt" space-after="6pt">
  Introduction
  
  <fo:block>
  
  
  
  space-before屬性和space-after屬性是儲存區域中屬性設置值中的兩種。這些屬性和層疊樣式表CSS相類似
  字體屬性
  font-family,font-weight,font-style (斜體),font-size,font-stretch,font-variant
  背景屬性
  background-color,background-image,background-repeat,background-attachment (卷動或固定)
  邊界屬性
  border-location-info:
  location可以為before,after,start,,end,,top,bottom,left或right
  info is 可以為字體,寬度或顏色
  填充屬性
  padding-location:`
  location is 可以為before,after,,start,end,top,bottom,left或right
  空白屬性
  margin-location:
  location可以為top,bottom,left或right
  文本排列屬性
  text-align和text-align-last (用作文本最後一行); 函數可以為start,end,left,right或center
  縮排屬性
  text-indent (第一行),start-indent,end-indent
  其他屬性
  wrap-option (沒有約束或有約束);widows和orphans (決定頁面的頂部或左部有多少行)break-after和break-before;reference-orientation (將正文旋轉90度)
  
  通過這些屬性,我們可以明確定位一個復雜的段落。定位使用 “復合數據類型”的標點符號可以使頁面的版面可以在不同的圖像分辨率下自動適應:
  <fo:block
  
  text-indent="1em"
  font-family="sans-serif" font-size="12pt"
  space-before.minimum="2pt"
  space-before.maximum="6pt"
  space-before.optimum="4pt"
  space-after.minimum="2pt"
  space-after.maximum="6pt"
  space-after.optimum="4pt">
  This handbook covers the major topics in Spanish, but is by no means complete.
  
  <fo:block>
  
  
  
  如果你的文檔有很多標題或段落時,你不需要將所有的文檔逐一格式化。有XSLT ,我們能用XSLT把文檔寫入HTML 或轉換成詳細的XSL:FO 譯本。以下是已經轉換好的HTML :
  <h3>Introduction</h3>
  <p>
  This handbook covers the major topics in Spanish, but is by no means complete.
  </p>
  <h3>Accents</h3>
  <p>
  When we pronounce English words, one syllable is usually
  emphasized (<b>stressed</b>, in linguistic terms).
  The stressed syllable is underlined in the following words: com<u>pu</u>ter,<u>lan</u>guage, de<u>vel</u

XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved