XML的学习笔记(二)

reference to some binary data


Creating and Referencing a Parameter Entity
就是在dtd中,加在xml中]>一样,
 
 
例子一:
 

%xhtml; 
例子二:

PCDATA %inline;)*> PCDATA %inline; | item)* >
entity parameter的一个用法[]

The solution is to use references to parameter entities in place of the INCLUDE and IGNORE keywords:

someExternal.dtd: 
  %XML; [
    ... XML-only definitions
  ]]>
  %SGML; [
    ... SGML-only definitions
  ]]>
  ... common definitions  

Then each document that uses the DTD can set up the appropriate entity definitions:

  
  
]>
<foo></foo>
  ...
  
大体意思就是,有时候dtd文档,可能需要根据情况分别应用一个xml文档或者一个sgml[]的文档,这种方式提供了方便。
命名空间(Name spacing)
这个东西主要是为了避免在dtd文件可能存在的同一个element在多个dtd中同时定义,那么除了改掉另外一个定义的方法,另外就是可以利用命名空间来区分他们。
 
  
 
  
 
  
 
 
 

多个空间的声明:
<sl:slideshow xmlns:sl="http:/www.example.com/slideshow">      xmlns:xhtml='urn:...'>
  ...
</sl:slideshow>

四条准则区分element和attribute
1、The data contains substructures:
2、The data contains multiple lines:
3、Multiple occurrences are possible:
4、The data changes frequently:
5、The data is a small, simple string that rarely if ever changes:
6、The data is confined to a small number of fixed choices:

要想设计好的文档(处理好element和attribute的关系)
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值