首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
Many WWW applications generate hypertext markup language or extensible markup language (XML) documents dynamically. Current tools, however, like languages using document object model (DOM) or JAVA Server Pages do not allow to check the validity of the generated documents statically. Instead, validity has to be ‘checked’ dynamically by appropriate test runs. This paper addresses this problem by introducing a new distinct class for each element type of a document type definition (DTD). Each class extends the Element-class of the DOM. The resulting object model is called validating DOM (V-DOM). Parametric XML (P-XML) is an extension of XML allowing to insert values of the newly defined classes in places, where the corresponding element types are allowed according to the underlying DTD. Like V-DOM, P-XML guarantees the validity of all XML documents generated by using P-XML. V-DOM and P-XML are illustrated by several examples.  相似文献   

2.
Measuring the structural similarity between an XML document and a DTD has many relevant applications that range from document classification and approximate structural queries on XML documents to selective dissemination of XML documents and document protection. The problem is harder than measuring structural similarity among documents, because a DTD can be considered as a generator of documents. Thus, the problem is to evaluate the similarity between a document and a set of documents. An effective structural similarity measure should face different requirements that range from considering the presence and absence of required elements, as well as the structure and level of the missing and extra elements to vocabulary discrepancies due to the use of synonymous or syntactically similar tags. In the paper, starting from these requirements, we provide a definition of the measure and present an algorithm for matching a document against a DTD to obtain their structural similarity. Finally, experimental results to assess the effectiveness of the approach are presented.  相似文献   

3.
基于DTD节点自动机的XML模式验证方法   总被引:1,自引:0,他引:1  
XML已经成为Web环境中数据表示和交换的标准。XML的模式验证在XML的使用中地位重要。DTD作为模式描述的一种方法,应用广泛,但使用DTD描述的模式不能正常表示同构的XML数据。文章扩展了DTD并提出了一种基于自动机的模式验证方法,将扩展的DTD中每个元素转换为一个自动机,将XML文档编码为字符串,并将字符串作为自动机的输入进行验证,可以有效地验证同构的XML。  相似文献   

4.
XML通过DTD或Schema定义文法。XML解析器根据预定义的文法对XML文档进行验证。但如果应用程序需要处理多个XML文档,并且这些文档之间存在引用,在应用程序中验证这些引用就非常困难。论文针对多XML文档关联验证,提出了一种通用的基于Xerces2-java的多XML文档关联验证机制,该机制通过扩展Xerces2-java现有的组件,在原有的解析过程中增加了关联验证的逻辑,给应用程序提供了方便、灵活的调用接口。实验表明,该机制能够完成XML文档的关联验证,较好地解决了多XML文档关联验证问题。  相似文献   

5.
DTDs(或XML Schema)的一致性是XML研究中的一个重要课题.一个DTD是一致的当且仅当存在有效的XML文档遵循这个DTD.然而一个一致性成立的DTD仍有可能存在一致性不成立的不合理子结构,同一致性不成立的DTDs一样,DTDs中一致性不成立的子结构同样应该尽量避免.为解决这一问题,对"元素在DTD中的一致性"、"DTDs完全一致性"等概念进行了定义和分析,并给出了一种新的DTDs完全一致性判断算法,该算法的最坏时间复杂度是O(n),具有较高的效率.  相似文献   

6.
Program slicing is a well-known technique to extract the program statements that (potentially) affect the values computed at some point of interest. In this work, we introduce a novel slicing method for XML documents. Essentially, given an XML document (which is valid w.r.t. some DTD), we produce a new XML document (a slice) that contains the relevant information in the original XML document according to some criterion. Furthermore, we also output a new DTD such that the computed slice is valid w.r.t. this DTD. A prototype implementation of the XML slicer has been undertaken.  相似文献   

7.
存在多值依赖的XML DTD规范化研究   总被引:1,自引:0,他引:1  
丘威  张立臣 《计算机科学》2007,34(2):149-151
XML DTD文档中可能包含由非函数依赖引起的数据冗余和操作异常,首先从消除DTD文档内数据冗余的角度出发研究了文档的规范化的问题,讨论了在DTD文档中存在多值依赖的情况下,如何规范XML文档,提出了以DTD为模式的XML文档的多值依赖的概念。然后基于多值依赖的概念,提出了XML文档的一种多值依赖范式MXNF。最后在此基础上提出了把一个XML文档的DTD无损联接地分解成为符合MXNF的规范化算法,来规范存在多值依赖的XML DTD文档,并给出了该算法的分析说明。  相似文献   

8.
XML access control models proposed in the literature enforce access restrictions directly on the structure and content of an XML document. Therefore access authorization rules (authorizations, for short), which specify access rights of users on information within an XML document, must be revised if they do not match with changed structure of the XML document. In this paper, we present two authorization translation problems. The first is a problem of translating instance-level authorizations for an XML document. The second is a problem of translating schema-level authorizations for a collection of XML documents conforming to a DTD. For the first problem, we propose an algorithm that translates instance-level authorizations of a source XML document into those for a transformed XML document by using instance-tree mapping from the transformed document instance to the source document instance. For the second problem, we propose an algorithm that translates value-independent schema-level authorizations of non-recursive source DTD into those for a non-recursive target DTD by using schema-tree mapping from the target DTD to the source DTD. The goal of authorization translation is to preserve authorization equivalence at instance node level of the source document. The XML access control models use path expressions of XPath to locate data in XML documents. We define property of the path expressions (called node-reducible path expressions) that we can transform schema-level authorizations of value-independent type by schema-tree mapping. To compute authorizations on instances of schema elements of the target DTD, we need to identify the schema elements whose instances are located by a node-reducible path expression of a value-independent schema-level authorization. We give an algorithm that carries out path fragment containment test to identify the schema elements whose instances are located by a node-reducible path expression.  相似文献   

9.
XML Schema与DTD的比较及应用   总被引:3,自引:0,他引:3  
XML是目前广泛应用的数据交换标准,而模式是应用XML进行数据交换的正确性的保证机制之一。模式详细描述了文档的结构,确保文档的元素和属性等的正确性。XML Schema和DTD是其中应用最广泛的模式。文中详细比较了两者的异同,并指出了各自的局限及最佳的应用,DTD非常适合于文本密集型XML文档,而XML Schema更适合于数据密集型XML文档。  相似文献   

10.
DTD作为一种XML文档结构的模式语言得到了广泛的使用,它描述了相似的XML文档的结构。DTD的一致性是指对于一个给定的DTD,判断是否存在至少有一个XML文档满足DTD。在引入DTD一致性的形式化定义的基础上,分析了引起DTD不一致性的各种因素,提出了DTD一致性的判定方法。  相似文献   

11.
XML documents generated dynamically by programs are typically represented as text strings or DOM trees. This is a low-level approach for several reasons: 1) traversing and modifying such structures can be tedious and error prone, 2) although schema languages, e.g., DTD, allow classes of XML documents to be defined, there are generally no automatic mechanisms for statically checking that a program transforms from one class to another as intended. We introduce XACT, a high-level approach for Java using XML templates as a first-class data type with operations for manipulating XML values based on XPath. In addition to an efficient runtime representation, the data type permits static type checking using DTD schemas as types. By specifying schemes for the input and output of a program, our analysis algorithm will statically verify that valid input data is always transformed into valid output data and that the operations are used consistently.  相似文献   

12.
对于基于DTD在关系数据库中存储XML文档,此处利用结点模型映射方法,实现用关系模式来表示目标XML文档的逻辑结构(即 XML模式或DTD).还介绍了如何在已建立好的关系模式中添加约束用来保持原有XML文档中隐含的约束信息,此外XML文档的元素之间通常是相互递归的,这里也对XML文档中在出现递归的情况时,如何来存储递归的XML文档进行说明.最后通过举例,证明此种方法是合理有效的.  相似文献   

13.
目前XML工具的编辑能力不足以保证生成有效的XML文档,缺乏对文档模式的合理利用。而由XMLSchema定义的文档模式,不仅提供了有效性验证标准,同时蕴含了生成有效XML文档的准则。本文提出了一种生成有效XML文档的方法。该方法基于XML文档模式图定义不同节点的操作集合,以及该操作集合上的计算和相应操作语义,并分析论证了该方法本身的有效性。  相似文献   

14.
XML documents are becoming popular for business process integration. To achieve interoperability between applications, XML documents must also conform to various commonly used data type definitions (DTDs). However, most business data are not maintained as XML documents. They are stored in various native formats, such as database tables or LDAP directories. Hence, a middleware is needed to dynamically generate XML documents conforming to predefined DTDs from various data sources. As industrial consortia and large corporations have created various DTDs, it is both challenging and time-consuming to design the necessary middleware to conform to so many different DTDs. This problem is particularly acute for a small- or medium-sized enterprise because it lacks the IT skills to quickly develop such a middleware. In this paper, we present XLE, an XML Lightweight Extractor, as a practical approach to dynamically extracting DTD-conforming XML documents from heterogeneous data sources. XLE is based on a framework called DTD source annotation (DTDSA). It treats a DTD as the control structure of a program. The annotations become the program statements, such as functions and assignments. DTD-conforming XML documents are generated by parsing annotated DTDs. Basically, DTD annotations describe declaratively the mappings between target XML documents and the source data. The XLE engine implements a few basic annotations, providing a practical solution for many small- and medium-sized enterprises. However, XLE is designed to be versatile. It allows sophisticated users to plug in their own implementations to access new types of data or to achieve better performance. Heterogeneous data sources can be simply specified in the annotations. A GUI tool is provided to highlight the places where annotations are needed.  相似文献   

15.
基于DOM模型的解析是多数XML文档处理系统所采用的技术,文档解析中在对DTD、XML注释以及XML结点的处理存在着一些漏洞,导致系统在解析那些利用了这些漏洞的恶意XML文档过程中易遭到攻击,分析了漏洞产生的原因,并提出相应的防御方法。  相似文献   

16.
XML数据类型验证算法的改进   总被引:2,自引:1,他引:1       下载免费PDF全文
介绍几种XML Schema类型验证算法,并对其中基于树自动机的算法进行研究,针对它在验证嵌套复杂类型XML文档过程中存在的问题,提出一种改进算法,为每个终结符增设一个处理状态标志,从而对以XML文档表示的数据类型进行验证。通过实验测试其性能,结果表明该算法是有效的。  相似文献   

17.
独立于模式的XML文档向关系数据的映射   总被引:4,自引:0,他引:4  
周伟胜  鱼滨 《微机发展》2005,15(1):100-103
Internet上存在着大量的需要处理不同来源的XML文档,然而许多XML文档无法用固定的DTD或Schema定义其结构,并且还存在大量无模式的XML文档需要处理,文中针对这种情况提出独立于模式的XML文档向关系数据库映射方法,该方法对数据操作有很好的执行效果。  相似文献   

18.
We consider XML documents described by a document type definition (DTD). An XML-grammar is a formal grammar that captures the syntactic features of a DTD. We investigate properties of this family of grammars. We show that every XML-language basically has a unique XML-grammar. We give two characterizations of languages generated by XML-grammars, one is set-theoretic, the other is by a kind of saturation property. We investigate decidability problems and prove that some properties that are undecidable for general context-free languages become decidable for XML-languages. We also characterize those XML-grammars that generate regular XML-languages.
Résumé. Nous considérons des documents XML décrits par une définition de type de document (DTD). Une grammaire XML est une grammaire formelle qui retient les aspects syntaxiques d'une DTD. Nous étudions les propriétés de cette famille de grammaires. Nous montrons qu'un langage XML a essentiellement une seule grammaire XML. Nous donnons deux caractérisations des langages engendrés par les grammaires XML, la première est ensembliste, la deuxième est par une propriété de saturation. Nous examinons des problèmes de décision et nous prouvons que certaines propriétés qui sont indécidables pour les langages context-free généraux deviennent décidables pour les langages XML. Nous caractérisons également les grammaires XML qui engendrent des langages rationnels.


Received: 16 March 2001 / 19 March 2002  相似文献   

19.
针对XML流数据的复杂Twig Pattern查询处理   总被引:2,自引:0,他引:2  
XML流数据处理在研究领域引起了研究者的广泛兴趣.针对XML流数据的、具有嵌套AND/OR谓词的复杂Twig Pattern查询处理,提出一种新方法.为了提高查询处理性能,将所有Twig Pattern合并为一个共享前缀的查询树,其中,AND/OR谓词被表示为单独的抽象语法树,因而能够以文档顺序、单遍地处理复杂Twig Pattern的匹配,并避免了YFilter中对嵌套谓词进行后置处理所产生的中间结果.实验结果表明,该方法能够有效改善Twig Pattern的处理性能,尤其是在处理大文档的情况下.基于已  相似文献   

20.
XML Schema作为XML文档模式的定义语言,其语法本身不能保证定义模式的有效性。该文首先分析影响XML文档模式有效性的因素,并构造了XML文档模式图。依据XML实例文档特点,分析了XML文档模式图性质,其中包括递归引用可能导致死锁发生的原因。最后,给出了XML文档模式有效性验证算法,从而弥补了常见验证工具功能的不完整。  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号