Introduction to the usage of DTDs in connection with XML documents. Elements and attributes are introduced in details. Use of ID, IDREF, and IDREFS for uniqueness and referring to elements are illustrated using a number of examples.
DTD stands for Document Type Definition and allows an XML document to specify requirements to be valid. It declares elements, attributes, and other components that can be used in an XML document. Validation ensures an XML document matches the DTD specifications by checking elements, attributes, and structure. DTDs can be embedded locally in an XML file or referenced externally from another file.
The document discusses XML and DTDs. It defines DTDs as describing the components and guidelines in an XML document by listing elements, attributes and their possible values, entities, and their interactions. It provides examples of element declarations in DTDs using tags like ELEMENT, EMPTY, ANY, and content models. It also distinguishes between internal and external DTDs and when each is generally used.
An attribute declaration specifies attributes for elements in a DTD. It defines the attribute name, data type or permissible values, and required behavior. For example, an attribute may have a default value if not provided, be optional, or require a value. Notations can label non-XML data types and unparsed entities can import binary files. Together DTDs and entities provide a schema to describe document structure and relationships.
DTD stands for Document Type Definition. It defines the structure and elements of an XML document. DTDs check if an XML document is valid by defining the grammar. They are used to create and manage large sets of shared documents. DTDs declare elements, attributes, entities, and define the document structure with content models. While DTDs were useful, more robust alternatives like XML Schema emerged.
The document discusses Document Type Definitions (DTDs) and XML parsers. It provides information on:
- What a DTD is and how it defines the legal elements and structure of an XML document.
- The different types of XML parsers, including non-validating parsers that only check well-formedness, and validating parsers that also check if a document conforms to a DTD.
- How DTDs can be internal, contained within an XML file, or external, stored in a separate file and linked to from the XML file. DTDs help ensure different people and programs can read each other's XML files by defining the allowed elements and attributes.
An XML DTD defines the grammar and legal building blocks of an XML document. It specifies elements, attributes, and entities that can be used. A DTD can be internal, defined within the XML file, or external, referenced from an outside file. Elements are declared with ELEMENT tags, attributes with ATTLIST, and entities allow special characters to be represented as shortcuts. A DTD enables validation of an XML file's structure and is useful for data exchange conformance.
A Document Type Definition (DTD) defines the legal building blocks of an XML document, including the document structure with a list of legal elements and attributes. A DTD can be declared internally within an XML file or externally as a reference. The DTD specifies elements, attributes, entities and other components allowed in the document and describes the relationships between them.
DTD stands for Document Type Definition and is used to define the structure and elements of an XML document. It allows you to create rules for elements within XML documents and ensures XML documents conform to the DTD. A DTD can be internal, within the XML document, or external, in a separate file. It uses elements, attributes, and operators to define elements, attributes, data types, cardinality, and sequences within an XML document.
DTD stands for Document Type Definition and allows an XML document to specify requirements to be valid. It declares elements, attributes, and other components that can be used in an XML document. Validation ensures an XML document matches the DTD specifications by checking elements, attributes, and structure. DTDs can be embedded locally in an XML file or referenced externally from another file.
The document discusses XML and DTDs. It defines DTDs as describing the components and guidelines in an XML document by listing elements, attributes and their possible values, entities, and their interactions. It provides examples of element declarations in DTDs using tags like ELEMENT, EMPTY, ANY, and content models. It also distinguishes between internal and external DTDs and when each is generally used.
An attribute declaration specifies attributes for elements in a DTD. It defines the attribute name, data type or permissible values, and required behavior. For example, an attribute may have a default value if not provided, be optional, or require a value. Notations can label non-XML data types and unparsed entities can import binary files. Together DTDs and entities provide a schema to describe document structure and relationships.
DTD stands for Document Type Definition. It defines the structure and elements of an XML document. DTDs check if an XML document is valid by defining the grammar. They are used to create and manage large sets of shared documents. DTDs declare elements, attributes, entities, and define the document structure with content models. While DTDs were useful, more robust alternatives like XML Schema emerged.
The document discusses Document Type Definitions (DTDs) and XML parsers. It provides information on:
- What a DTD is and how it defines the legal elements and structure of an XML document.
- The different types of XML parsers, including non-validating parsers that only check well-formedness, and validating parsers that also check if a document conforms to a DTD.
- How DTDs can be internal, contained within an XML file, or external, stored in a separate file and linked to from the XML file. DTDs help ensure different people and programs can read each other's XML files by defining the allowed elements and attributes.
An XML DTD defines the grammar and legal building blocks of an XML document. It specifies elements, attributes, and entities that can be used. A DTD can be internal, defined within the XML file, or external, referenced from an outside file. Elements are declared with ELEMENT tags, attributes with ATTLIST, and entities allow special characters to be represented as shortcuts. A DTD enables validation of an XML file's structure and is useful for data exchange conformance.
A Document Type Definition (DTD) defines the legal building blocks of an XML document, including the document structure with a list of legal elements and attributes. A DTD can be declared internally within an XML file or externally as a reference. The DTD specifies elements, attributes, entities and other components allowed in the document and describes the relationships between them.
DTD stands for Document Type Definition and is used to define the structure and elements of an XML document. It allows you to create rules for elements within XML documents and ensures XML documents conform to the DTD. A DTD can be internal, within the XML document, or external, in a separate file. It uses elements, attributes, and operators to define elements, attributes, data types, cardinality, and sequences within an XML document.
The document discusses XML schemas, explaining that they define elements, attributes, and data types that can be used in XML documents. It covers creating simple and complex elements, declaring data types, and grouping elements using sequences, groups, and choices. The document also provides examples of how to define attributes and create user-defined data types in an XML schema.
Document Type Definitions (DTDs) define an XML document's structure using EBNF grammar. DTDs specify elements, attributes, and permitted structure. Parsers can validate documents against DTDs to check for conformity. DTDs are introduced using a document type declaration (DOCTYPE) which can reference an internal or external subset. Element declarations define elements using names (generic identifiers) and content specifications, which indicate permitted child elements and content types like PCDATA. Well-formed documents follow XML syntax rules while valid documents also conform to their DTD.
The document discusses XML namespaces and how they are used to avoid ambiguity when combining XML documents from different sources. Namespaces allow element and attribute names to be distinguished by providing a unique prefix. Namespaces can be declared at the root element level so that all child elements inherit the namespace, or at lower levels to limit the scope. Shorthand namespace prefixes make namespace declarations and usage more readable.
The document discusses XML namespaces and XML schemas. It provides examples of using namespaces to differentiate between similarly named elements, such as <highschool:subject> and <medicine:subject>. It also compares defining an XML document using a DTD versus using an XML schema, and provides a sample schema for defining book information. Key differences between "ref" and "type" attributes in schemas are explained using an employee example.
This document defines and provides examples of XML DTDs. It explains that a DTD defines the structure and elements of an XML document and can be used to validate XML data. It describes the syntax of DTDs and the different types (internal and external). Key points covered include that a DTD specifies elements, attributes, and entities; defines the root element; and element types include PCDATA for parsed character data and CDATA for non-parsed character data. Examples are provided of internal and external DTDs. The document concludes that using a DTD allows different groups to agree on a common standard for exchanging data and applications to validate received and internal data.
The document discusses the building blocks of XML documents including elements, attributes, entities, PCDATA, and CDATA. It also covers how each component is declared in a DTD including element declarations, attribute declarations, and restrictions on content and occurrence.
This document discusses the structure and components of an XML document. It explains that an XML document consists of elements, attributes, comments, processing instructions, and a document type declaration. It describes each of these components in detail, including their purpose and general syntax. The document type declaration identifies the document and can reference an internal or external DTD that defines the valid elements and attributes.
Content:
- Structures
- Datatypes
References:
- Beginning XML, 5th Edition, Joe Fawcett, Liam R. E. Quin, Danny Ayers
- XML in a nutshell,3rd Edition, Elliotte Rusty Harold & W. Scott Means
- http://www.w3schools.com/
The document discusses XML document type definitions (DTDs). It explains that DTDs are used to define the structure, elements, and attributes of an XML language. It provides examples of element declarations that define tags and child elements. It also discusses attribute declarations that define element attributes and their types. The document outlines how DTDs can be internal, embedded in the XML document, or external, referenced from an external file.
The document discusses XML document type definitions (DTDs), including how they are used to define the structure and elements of an XML document and validate that an XML document complies with the DTD. It covers DTD components like element type definitions, attribute list declarations, and content models that specify element sequences and occurrence. It also discusses how parsers can validate XML documents against associated DTDs.
SQL Server - Querying and Managing XML DataMarek Maśko
This document provides an overview and agenda for a presentation on querying and managing XML data in SQL Server. The presentation covers XML introduction and terminology, returning query results as XML using the FOR XML clause, querying XML data with XQuery, and using the XML data type including methods and indexes. It includes examples and review questions. The author is Marek Maśko, a principal database analyst who has worked with SQL Server for 7 years.
XML Schema Definition (XSD) defines the structure and legal elements and attributes of an XML document. An XSD specifies elements and complex types that can appear in an XML file and places restrictions on values like data types, lengths, formats and more. It also defines the order of child elements and how many times elements can appear.
XML is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. It was designed to carry data, not display it like HTML. XML is important because it separates data from presentation, allows data to be shared across different systems, and makes data easier to store and process. The basic building blocks of XML include elements, attributes, entities, processing instructions, comments, and tags.
XML (eXtensible Markup Language) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. It is designed to transport and store data with a focus on what data is. XML has several advantages over HTML such as being extensible, content-oriented, and providing a standard data infrastructure and data validation capabilities. XML documents form a tree structure with properly nested elements. XML uses tags to mark elements and attributes to provide additional information about elements.
XML is a specification for creating custom markup languages. It allows computers to share structured data by defining rules for encoding documents in a format that is both human-readable and machine-readable. XML documents use tags to define the structure and meaning of content. Well-formed XML documents follow syntax rules, while valid documents also conform to semantic rules defined in an external DTD or schema file. This ensures XML documents can be processed and shared reliably across different computers and platforms.
The document discusses XML document structure and XML schema. It provides information on the key components of an XML document including the XML declaration, document type declaration, element data, attribute data, and character data. It then describes XML schema in detail, explaining that it defines the structure of an XML document. Key aspects of XML schema covered include elements, attributes, simple vs complex types, and restrictions.
XML Schema defines rules for encoding documents in a machine-readable format. It allows data exchange between systems independently of programming languages. XML Schema defines elements, attributes, and data types to structure XML documents. It provides more data typing capabilities than DTDs. Namespaces are used to avoid element name conflicts between different XML vocabularies. User-defined types can restrict built-in types or create new complex types from simple types to structure application-specific data.
This document provides an overview of XML programming and XML documents. It discusses the physical and logical views of an XML document, document structure including the root element, and how XML documents are commonly stored as text files. It also summarizes how an XML parser reads and validates an XML document by checking its syntax and structure. The document then covers various XML components in more detail, such as elements, attributes, character encoding, entities, processing instructions, well-formedness, validation via DTDs, and document modeling.
The document discusses using XML and Java together. It covers XML parsers like DOM and SAX, as well as Java XML parsers like DOM, JDOM, and SAX. It compares DOM and JDOM APIs and provides examples of using JDOM to parse and generate XML. The document also discusses XML technologies like XPath, XSL, and using XML with Java technologies like JSP.
A comparison of a database table to an XML document. There is an overview of basic XML concepts suchs as attribute, element, entity, and tag. Data centric and document centric XML document are covered.
An introduction to the XPath XML query possibilities. In particular, there is a focus on the abbreviations that makes XPath efficient to use. A larger section is allocated to explain and illustrated the use of axes in XPath
The document discusses XML schemas, explaining that they define elements, attributes, and data types that can be used in XML documents. It covers creating simple and complex elements, declaring data types, and grouping elements using sequences, groups, and choices. The document also provides examples of how to define attributes and create user-defined data types in an XML schema.
Document Type Definitions (DTDs) define an XML document's structure using EBNF grammar. DTDs specify elements, attributes, and permitted structure. Parsers can validate documents against DTDs to check for conformity. DTDs are introduced using a document type declaration (DOCTYPE) which can reference an internal or external subset. Element declarations define elements using names (generic identifiers) and content specifications, which indicate permitted child elements and content types like PCDATA. Well-formed documents follow XML syntax rules while valid documents also conform to their DTD.
The document discusses XML namespaces and how they are used to avoid ambiguity when combining XML documents from different sources. Namespaces allow element and attribute names to be distinguished by providing a unique prefix. Namespaces can be declared at the root element level so that all child elements inherit the namespace, or at lower levels to limit the scope. Shorthand namespace prefixes make namespace declarations and usage more readable.
The document discusses XML namespaces and XML schemas. It provides examples of using namespaces to differentiate between similarly named elements, such as <highschool:subject> and <medicine:subject>. It also compares defining an XML document using a DTD versus using an XML schema, and provides a sample schema for defining book information. Key differences between "ref" and "type" attributes in schemas are explained using an employee example.
This document defines and provides examples of XML DTDs. It explains that a DTD defines the structure and elements of an XML document and can be used to validate XML data. It describes the syntax of DTDs and the different types (internal and external). Key points covered include that a DTD specifies elements, attributes, and entities; defines the root element; and element types include PCDATA for parsed character data and CDATA for non-parsed character data. Examples are provided of internal and external DTDs. The document concludes that using a DTD allows different groups to agree on a common standard for exchanging data and applications to validate received and internal data.
The document discusses the building blocks of XML documents including elements, attributes, entities, PCDATA, and CDATA. It also covers how each component is declared in a DTD including element declarations, attribute declarations, and restrictions on content and occurrence.
This document discusses the structure and components of an XML document. It explains that an XML document consists of elements, attributes, comments, processing instructions, and a document type declaration. It describes each of these components in detail, including their purpose and general syntax. The document type declaration identifies the document and can reference an internal or external DTD that defines the valid elements and attributes.
Content:
- Structures
- Datatypes
References:
- Beginning XML, 5th Edition, Joe Fawcett, Liam R. E. Quin, Danny Ayers
- XML in a nutshell,3rd Edition, Elliotte Rusty Harold & W. Scott Means
- http://www.w3schools.com/
The document discusses XML document type definitions (DTDs). It explains that DTDs are used to define the structure, elements, and attributes of an XML language. It provides examples of element declarations that define tags and child elements. It also discusses attribute declarations that define element attributes and their types. The document outlines how DTDs can be internal, embedded in the XML document, or external, referenced from an external file.
The document discusses XML document type definitions (DTDs), including how they are used to define the structure and elements of an XML document and validate that an XML document complies with the DTD. It covers DTD components like element type definitions, attribute list declarations, and content models that specify element sequences and occurrence. It also discusses how parsers can validate XML documents against associated DTDs.
SQL Server - Querying and Managing XML DataMarek Maśko
This document provides an overview and agenda for a presentation on querying and managing XML data in SQL Server. The presentation covers XML introduction and terminology, returning query results as XML using the FOR XML clause, querying XML data with XQuery, and using the XML data type including methods and indexes. It includes examples and review questions. The author is Marek Maśko, a principal database analyst who has worked with SQL Server for 7 years.
XML Schema Definition (XSD) defines the structure and legal elements and attributes of an XML document. An XSD specifies elements and complex types that can appear in an XML file and places restrictions on values like data types, lengths, formats and more. It also defines the order of child elements and how many times elements can appear.
XML is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. It was designed to carry data, not display it like HTML. XML is important because it separates data from presentation, allows data to be shared across different systems, and makes data easier to store and process. The basic building blocks of XML include elements, attributes, entities, processing instructions, comments, and tags.
XML (eXtensible Markup Language) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. It is designed to transport and store data with a focus on what data is. XML has several advantages over HTML such as being extensible, content-oriented, and providing a standard data infrastructure and data validation capabilities. XML documents form a tree structure with properly nested elements. XML uses tags to mark elements and attributes to provide additional information about elements.
XML is a specification for creating custom markup languages. It allows computers to share structured data by defining rules for encoding documents in a format that is both human-readable and machine-readable. XML documents use tags to define the structure and meaning of content. Well-formed XML documents follow syntax rules, while valid documents also conform to semantic rules defined in an external DTD or schema file. This ensures XML documents can be processed and shared reliably across different computers and platforms.
The document discusses XML document structure and XML schema. It provides information on the key components of an XML document including the XML declaration, document type declaration, element data, attribute data, and character data. It then describes XML schema in detail, explaining that it defines the structure of an XML document. Key aspects of XML schema covered include elements, attributes, simple vs complex types, and restrictions.
XML Schema defines rules for encoding documents in a machine-readable format. It allows data exchange between systems independently of programming languages. XML Schema defines elements, attributes, and data types to structure XML documents. It provides more data typing capabilities than DTDs. Namespaces are used to avoid element name conflicts between different XML vocabularies. User-defined types can restrict built-in types or create new complex types from simple types to structure application-specific data.
This document provides an overview of XML programming and XML documents. It discusses the physical and logical views of an XML document, document structure including the root element, and how XML documents are commonly stored as text files. It also summarizes how an XML parser reads and validates an XML document by checking its syntax and structure. The document then covers various XML components in more detail, such as elements, attributes, character encoding, entities, processing instructions, well-formedness, validation via DTDs, and document modeling.
The document discusses using XML and Java together. It covers XML parsers like DOM and SAX, as well as Java XML parsers like DOM, JDOM, and SAX. It compares DOM and JDOM APIs and provides examples of using JDOM to parse and generate XML. The document also discusses XML technologies like XPath, XSL, and using XML with Java technologies like JSP.
A comparison of a database table to an XML document. There is an overview of basic XML concepts suchs as attribute, element, entity, and tag. Data centric and document centric XML document are covered.
An introduction to the XPath XML query possibilities. In particular, there is a focus on the abbreviations that makes XPath efficient to use. A larger section is allocated to explain and illustrated the use of axes in XPath
This document discusses using SQL/XML on Oracle databases. It provides an overview and outlines how to:
1. Extract relational data from tables and represent it as XML using SQL/XML publishing functions
2. Store XML data in the database using the XML data type
3. Transform XML data back into relational tables
The examples show how to start with simple XML generation and build up to a well-formed XML document with headers, root elements, and XSLT references.
This document outlines a process for integrating a finding aid (series inventory) with digital objects in a CONTENTdm collection. It describes exporting metadata from CONTENTdm, transforming it with an XSLT stylesheet to include URLs, and inserting the results into the finding aid using Microsoft Word mail merge to link containers to digital files. The end result is an EAD finding aid with integrated links from the container list to digital objects.
The document provides an introduction to XML, explaining that it stands for Extensible Markup Language and is used to transport and store structured data. It describes how XML uses tags to identify different types of content and relationships. DTDs (Document Type Definitions) are also introduced, which allow users to define rules for tags and relationships in an XML document.
The document discusses several examples of using XML including internal and external DTDs to define bookstore and employee data, as well as using XML Schema to define message and employee details. XML documents are provided as examples to demonstrate using the defined DTDs and schemas. The last section shows applying CSS styling to an XML document.
This presentation discusses the following topics:
What is XML?
Syntax of XML Document
DTD (Document Type Definition)
XML Schema
XML Query Language
XML Databases
Oracle JDBC
Training in Analytics, R and Social Media AnalyticsAjay Ohri
This document provides an overview of basics of analysis, analytics, and R. It discusses why analysis is important, key concepts like central tendency, variance, and frequency analysis. It also covers exploratory data analysis, common analytics software, using R for tasks like importing data, data manipulation, visualization and more. Examples and demos are provided for many common R functions and techniques.
The document provides an introduction to XML including:
- XML is an extensible markup language used to store and transport data, often over the Internet.
- XML documents form a tree structure with elements forming parent-child relationships.
- The XML DOM defines a standard way to access and manipulate XML documents and presents them as a tree structure.
- XPath uses path-like syntax to navigate XML documents and select nodes.
- XSLT is used to transform XML documents into other formats like HTML.
- DTDs and XML Schemas define the structure and elements of XML documents and are used to validate their structure.
The document provides an overview of XML, XSLT, and XPath. It discusses the history and goals of XML, how to structure an XML document including elements, attributes, and namespaces. It also covers XML Schema, XPath, and how XSLT uses XPath to transform an XML document into another format.
The document presents a graphical approach called Graphical Notations-Data Type Documentation (GN-DTD) for normalizing XML documents. GN-DTD allows capturing the syntax and semantics of XML documents in a simple but precise way using various notations. It can visualize important XML features like elements, attributes, relationships, hierarchy, cardinality, sequence and disjunction clearly at the schema level. The paper then demonstrates how a sample DTD is transformed into a GN-DTD graph to represent the structure and constraints of an XML document and avoid potential data redundancies and update anomalies.
Decoding and developing the online finding aidkgerber
Workshop for the Library Technology Conference on Encoded Archival Description, and the mark-up languages involved in its use including HTML, XML, and XSLT.
This document provides an overview of XML, including:
- XML is not a replacement for HTML, a presentation format, programming language, or network transfer protocol, but can be used with these.
- XML examples demonstrating tags, elements, attributes, and how XML documents form ordered trees.
- Key aspects of XML like namespaces, DTDs, schemas, and how XML documents are linked to external definitions.
distributed system concerned lab sessionsmilkesa13
The document discusses XML and its features. It begins with explaining why XML is needed to standardize data exchange between different systems. It then covers key topics like XML syntax with tags, XML tree structure, creating simple XML files, using DTDs to validate XML files, and introduces more advanced concepts like XML Schema and XPath. The document provides examples to illustrate different XML structures and capabilities.
The document discusses different types of lists and tables that can be created in HTML. It describes unordered lists created with <ul> tags, ordered lists with <ol> tags, and definition lists with <dl> tags. It also covers creating tables with <table>, <tr>, <td>, and <th> tags and additional attributes like colspan, rowspan, thead, tbody, and tfoot to structure table headers, bodies and footers. Students are assigned to practice creating different types of lists and tables based on the examples and explanations provided in the document.
tl;dr - How will the everyday developer cope with Java 8’s Language changes?
Java 8 will ship with a powerful new abstraction - Lambda Expressions (aka Closures) and a completely retooled set of Collections libraries. In addition interfaces have changed through the addition of default and static methods. The ongoing debate as to whether Java should include such language changes has resulted in many vocal opinions being espoused. Sadly few of these opinions have been backed up by practical experimentation and experience. - Are these opinions just myths?
- What mistakes does a developer make?
- Can a ‘blue collar’ Java Developer cope with functional programming?
- Can we avoid these mistakes in future?
In London, we’ve been running a series of hackdays trying out Lambda Expressions as part of the Adopt-a-JSR program and have been recording and analysing the results. Huge topics of mailing list discussion have been almost entirely irrelevant problems to developers, and some issues which barely got any coverage at all have proved to be a consistent thorn in people’s side.
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)jaxLondonConference
Presented at JAX London 2013
tl;dr - How will the everyday developer cope with Java 8’s Language changes?
Java 8 will ship with a powerful new abstraction - Lambda Expressions (aka Closures) and a completely retooled set of Collections libraries. In addition interfaces have changed through the addition of default and static methods. The ongoing debate as to whether Java should include such language changes has resulted in many vocal opinions being espoused. Sadly few of these opinions have been backed up by practical experimentation and experience. - Are these opinions just myths?
EAD Revision Progress Report, SAA 2013Michael Rush
The document summarizes the timeline and process for revising the Encoded Archival Description (EAD) schema. It notes that the revision began in 2010 and has included multiple phases of development including an alpha release in 2013 and a beta release in August 2013. Feedback on the beta release was collected through October 2013. The finalization of the revised schema is planned for winter 2014, along with its submission for adoption by the Society of American Archivists.
This document provides an introduction to XML Path Language (XPath), which is a syntax for locating information in an XML document. It describes the different node types in an XML document and XPath tree, such as element nodes, attribute nodes, and text nodes. It also explains some basic XPath concepts like axes, node tests, and location paths that allow navigating the XPath tree using steps separated by axes and node tests. Some examples of XPath functions and operators for manipulating node sets returned from location paths are also presented. Finally, it provides sample XML documents and uses XPath to select nodes and extract information from them.
The DE-9IM Matrix in Details using ST_Relate: In Picture and SQLtorp42
The DE-9IM matrix is the foundation for understanding how spatial relationships are implemented in DBMSs like PostgreSQL, Oracle, and Microsoft SQL Server. This presentation makes a structure walk-through of most of the cases using a very large number of examples.
An overview of ER-diagrams including entity sets, relationship sets, and attributes. The four attributes types are covered and cardinality constraints. Further partial or full participation is discussed.
The document discusses modifications to temporal databases with valid time. It describes implicit timestamping where timestamps are system-generated. Valid time insert adds a row with a valid from timestamp and "now" as the valid to. Valid time update sets the valid to of the old row and adds a new row with the new valid from and "now". Valid time delete sets the valid to timestamp of a row to the current time.
An overview of typical queries on a temporal database, e.g., temporal natural join, temporal coalescing, or temporal set operators. Examples are provided using valid-time, transaction-time and bitemporal databases.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
20 Comprehensive Checklist of Designing and Developing a WebsitePixlogix Infotech
Dive into the world of Website Designing and Developing with Pixlogix! Looking to create a stunning online presence? Look no further! Our comprehensive checklist covers everything you need to know to craft a website that stands out. From user-friendly design to seamless functionality, we've got you covered. Don't miss out on this invaluable resource! Check out our checklist now at Pixlogix and start your journey towards a captivating online presence today.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/building-and-scaling-ai-applications-with-the-nx-ai-manager-a-presentation-from-network-optix/
Robin van Emden, Senior Director of Data Science at Network Optix, presents the “Building and Scaling AI Applications with the Nx AI Manager,” tutorial at the May 2024 Embedded Vision Summit.
In this presentation, van Emden covers the basics of scaling edge AI solutions using the Nx tool kit. He emphasizes the process of developing AI models and deploying them globally. He also showcases the conversion of AI models and the creation of effective edge AI pipelines, with a focus on pre-processing, model conversion, selecting the appropriate inference engine for the target hardware and post-processing.
van Emden shows how Nx can simplify the developer’s life and facilitate a rapid transition from concept to production-ready applications.He provides valuable insights into developing scalable and efficient edge AI solutions, with a strong focus on practical implementation.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Speck&Tech
ABSTRACT: A prima vista, un mattoncino Lego e la backdoor XZ potrebbero avere in comune il fatto di essere entrambi blocchi di costruzione, o dipendenze di progetti creativi e software. La realtà è che un mattoncino Lego e il caso della backdoor XZ hanno molto di più di tutto ciò in comune.
Partecipate alla presentazione per immergervi in una storia di interoperabilità, standard e formati aperti, per poi discutere del ruolo importante che i contributori hanno in una comunità open source sostenibile.
BIO: Sostenitrice del software libero e dei formati standard e aperti. È stata un membro attivo dei progetti Fedora e openSUSE e ha co-fondato l'Associazione LibreItalia dove è stata coinvolta in diversi eventi, migrazioni e formazione relativi a LibreOffice. In precedenza ha lavorato a migrazioni e corsi di formazione su LibreOffice per diverse amministrazioni pubbliche e privati. Da gennaio 2020 lavora in SUSE come Software Release Engineer per Uyuni e SUSE Manager e quando non segue la sua passione per i computer e per Geeko coltiva la sua curiosità per l'astronomia (da cui deriva il suo nickname deneb_alpha).
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Introduction to DTD
1. Introduction to DTD
Kristian Torp
Department of Computer Science
Aalborg University
people.cs.aau.dk/˜torp
torp@cs.aau.dk
November 3, 2015
daisy.aau.dk
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 1 / 37
2. Outline
1 Introduction
2 Elements
3 Attributes
4 DTD Find Errors
5 Putting it All Together
6 Summary
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 2 / 37
3. Learning Outcomes
Learning Outcomes
Be able to read and understand a DTD
Be able to construct a DTD for a set of existing XML documents
Be able to validate an XML document against a DTD
Know the limitations of a DTD
Database Focus
All XML technologies are presented from a database perspective!
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 3 / 37
4. Outline
1 Introduction
2 Elements
3 Attributes
4 DTD Find Errors
5 Putting it All Together
6 Summary
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 4 / 37
5. Example: Course Catalog XML Document
User Requirements
Make a DTD for the course catalog
Use the DTD to validate our course catalog XML document
Example (Current Courses)
<?xml version=” 1.0 ” ?>
<coursecatalog>
<course cid= ’P4 ’>
<name>OOP</name>
<semester>3</ semester>
<desc>Object−oriented programming</ desc>
</ course>
<course cid= ’P2 ’>
<name>DB</name>
<semester>7</ semester>
<desc>Databases including SQL</ desc>
</ course>
</ coursecatalog>
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 5 / 37
6. Example: Course Catalog DTD
Example (DTD for Course Catalog)
<?xml version=” 1.0 ” encoding=”UTF−8” ?>
<!ELEMENT coursecatalog ( course )∗>
<!ELEMENT course (name, semester , desc ) >
<!ELEMENT name (#PCDATA)>
<!ELEMENT semester (#PCDATA)>
<!ELEMENT desc (#PCDATA)>
<! ATTLIST course cid ID #REQUIRED>
Informal Description
A course catalog consists of zero or more of courses
A course consists of a name, a semester, and a description
It is identified by an ID that is required
A (course) name is a string (leaf in XML document)
A semester is a string (leaf in XML document)
A description is a string (leaf in XML document)
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 6 / 37
7. Overview
Purpose
Define the document structure
Legal elements and attributes
Serves the same purpose as a create table statement in SQL
Structure and type of data
Integrity constraints!
Left over from SGML
Is not written in XML
If this is a requirement then use XML Schema
Still very widely used
Because much simpler than XML Schema
Note
Many simple errors can be found using a DTD
A necessity if receiving XML documents from external sources
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 7 / 37
8. Outline
1 Introduction
2 Elements
3 Attributes
4 DTD Find Errors
5 Putting it All Together
6 Summary
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 8 / 37
9. Simplest Entity
Example (Element Declaration)
<!ELEMENT name (#PCDATA)>
Example (Allowed Values)
<name>Hello Element</name>
<name/>
<name><![CDATA[ select ∗ from emp where sal > 10]]></name>
Example (Illegal Values)
<name>> </name>
<name>></name>
<name><it>Hello</it></name>
Unknown element <it>, must be defined in DTD
Note
Root, internal-node, and leafs in XML tree representation
Terminal and non-terminal in grammar terminology
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 9 / 37
10. Sequences of Child Elements
Example (Element Declaration)
<!ELEMENT course (name, semester, desc)>
Example (Allowed XML Fragment, Why?)
<course>
<name>OOP</name>
<semester>7</ semester>
<desc>I n t r o d u c t i o n to OOP</ desc>
</ course>
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 10 / 37
11. Sequences of Child Elements
Example (Element Declaration)
<!ELEMENT course (name, semester, desc)>
Example (Allowed XML Fragment, Why?)
<course>
<name>OOP</name>
<semester>7</ semester>
<desc>I n t r o d u c t i o n to OOP</ desc>
</ course>
Example (Disallowed XML Fragment, Why?)
<course>
<semester>7</ semester>
<name>OOP</name>
</ course>
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 10 / 37
12. Sequences of Child Elements
Example (Element Declaration)
<!ELEMENT course (name, semester, desc)>
Example (Allowed XML Fragment, Why?)
<course>
<name>OOP</name>
<semester>7</ semester>
<desc>I n t r o d u c t i o n to OOP</ desc>
</ course>
Example (Disallowed XML Fragment, Why?)
<course>
<semester>7</ semester>
<name>OOP</name>
</ course>
Example (Is this allowed?)
<course></ course>
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 10 / 37
13. Choice Among Child Elements
Example (Element Declaration)
<!ELEMENT circle (x, y, (radius | diameter))>
Example (Allowed XML Fragment)
< c i r c l e>
<x>5</ x>
<y>9</ y>
<diameter>7</ diameter>
</ c i r c l e>
Example (Illegal XML Fragment)
< c i r c l e>
<x>4</ x>
<y>8</ y>
<radius>3.5</ radius>
<diameter>7</ diameter>
</ c i r c l e>
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 11 / 37
14. Symbols in a DTD
Symbols
Symbol Example
∗ <!ELEMENT coursecatalog (course)∗>
+ <!ELEMENT coursecatalog (course)+>
? <!ELEMENT coursecatalog (course)?>
, <!ELEMENT course (name, semester, desc) >
| <!ELEMENT course (name | semester | desc) >
Note
Symbols are mostly taken from regular expressions
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 12 / 37
15. Mixed Content
Example (Data Centric)
<!ELEMENT coor ( x , y )>
Example (Allowed Fragment)
<coor>
<x>5</ x>
<y>9</ y>
</ coor>
Example (Mixed Content)
<!ELEMENT coor ( x , y , #PCDATA)∗>
Example (Allowed Fragment)
<coor>
This i s the coordinate
(<x>5</ x> , <y>9</ y>) where
the treasure i s hidden !
</ coor>
Note
Data centric very table like
Mixed content also called narrative document
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 13 / 37
16. Element Declarations using ANY
Example (Any)
<!ELEMENT coor (ANY)>
<!ELEMENT x (#PCDATA)
<!ELEMENT y (#PCDATA)
Example (Allowed Fragments)
<coor/>
<coor>Hello World</coor>
<coor>Hello <x>1</x><x/>World<y>3</y><y>4</y></coor>
<coor>Hello <x>1</x><y>2</y>World<y>3</y><x>4</x></coor>
Example (Illegal Fragments)
<coor><z>1</z></coor>
<coor><x>1</x><y>1<y/><z>1</z></coor>
Note
ANY handy for narrative documents, e.g., HTML
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 14 / 37
17. Element Declarations using EMPTY
Example (Empty)
<!ELEMENT coor EMPTY>
Example (Allowed?)
<coor></coor>
<coor/>
<coor>Hello</coor>
<coor><x>Hello</x></coor>
<coor> </coor>
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 15 / 37
18. Summary: Elements
Repetition
Symbol Explanation Example
? zero-or-one <!ELEMENT person (address?)>
* zero-or-more <!ELEMENT person (address∗)>
+ one-or-more <!ELEMENT person (address+)>
once <!ELEMENT person (address)>
Sequence or Choice
Symbol Explanation Example
, Sequence <!ELEMENT coor (x, y)>
| Choice <!ELEMENT coor (x | y)>
Data Type
Symbol Explanation Example
#PCDATA String <!ELEMENT name (#PCDATA)>
ANY What ever <!ELEMENT coor (ANY)>
EMPTY Empty <!ELEMENT room EMPTY>
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 16 / 37
19. Outline
1 Introduction
2 Elements
3 Attributes
4 DTD Find Errors
5 Putting it All Together
6 Summary
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 17 / 37
20. Attribute Declarations
Example (Circles)
<?xml version= ’ 1.0 ’ encoding= ’ utf −8 ’?>
<!ELEMENT drawing ( c i r c l e )∗>
<!ELEMENT c i r c l e ( x , y , ( radius | diameter ) )>
<! ATTLIST c i r c l e cid ID #REQUIRED
name CDATA #IMPLIED >
<!ELEMENT x (#PCDATA)>
<!ELEMENT y (#PCDATA)>
<!ELEMENT radius (#PCDATA)>
<! ATTLIST radius u n i t (mm|cm |m) ”m”> <!−− Enum with default −−>
<!ELEMENT diameter (#PCDATA)>
<! ATTLIST diameter u n i t (mm|cm |m) #REQUIRED> <!−− Enum no default −−>
Note
Mandatory and optional attributes
One or more attributes
Enumeration with defaults
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 18 / 37
21. Example Document
Example (Circles)
<?xml version=” 1.0 ” encoding= ’UTF−8 ’?>
<!DOCTYPE drawing SYSTEM ” c i r c l e a t t . dtd ”>
<drawing>
< c i r c l e cid= ’C1 ’ name= ’ f o r e s t ’>
<x>8</ x> <y>8</ y>
<radius>4</ radius> <!−− default u n i t−−>
</ c i r c l e>
< c i r c l e cid= ’C2 ’> <!−− name not required −−>
<x>5</ x> <y>5</ y>
<radius u n i t =”cm”>4</ radius> <!−− e x p l i c i t u n i t−−>
</ c i r c l e>
</ drawing>
Note
Unique value is not an integer
Used that attribute name is optional in element circle
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 19 / 37
22. Uniqueness, Examples
Example (Circle/Points with IDs)
<?xml version= ’ 1.0 ’ encoding= ’ utf −8 ’?>
<!ELEMENT drawing ( point | c i r c l e )∗>
<!ELEMENT point ( x , y )>
<!ELEMENT c i r c l e ( x , y , ( radius | diameter ) )>
<! ATTLIST c i r c l e did ID #REQUIRED>
<! ATTLIST point did ID #REQUIRED>
Example (Circles)
<drawing>
< c i r c l e did= ’C1 ’>
<x>8</ x> <y>8</ y>
<radius>4</ radius>
</ c i r c l e>
<point did= ’P2 ’>
<x>5</ x> <y>5</ y>
</ point>
</ drawing>
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 20 / 37
23. Uniqueness, Errors
Example (Find the error 1!)
<drawing>
<c i r c l e cid= ’C1 ’ name= ’ f o r e s t ’>
<x>8</ x> <y>8</ y>
<radius>5</ radius>
</ c i r c l e>
<c i r c l e cid= ’C1 ’>
<x>5</ x> <y>5</ y>
<radius u n i t =”cm”>8</ radius>
</ c i r c l e>
</ drawing>
Example (Find the error 2!)
<drawing>
<c i r c l e did= ’C11 ’>
<x>8</ x> <y>8</ y>
<radius>4</ radius>
</ c i r c l e>
<point did= ’C11 ’>
<x>5</ x> <y>5</ y>
</ point>
</ drawing>
Example (Find the error 3!)
<drawing>
<c i r c l e cid= ’C1 ’ name= ’ f o r e s t ’>
<x>8</ x> <y>8</ y>
<radius>5</ radius>
</ c i r c l e>
<c i r c l e cid= ’2C ’>
<x>5</ x> <y>5</ y>
<radius u n i t =”cm”>8</ radius>
</ c i r c l e>
</ drawing>
Example (Find the error 4!)
<drawing>
<c i r c l e did= ’C11 ’>
<x>8</ x> <y>8</ y>
<radius>4</ radius>
</ c i r c l e>
<point did= ’ C1111111111111111111111
<x>5</ x> <y>5</ y>
</ point>
</ drawing>
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 21 / 37
24. Uniqueness
Limitations
Only attribute values unique not element values
Cannot be a integer, e.g., <circle did=’1’> not allowed
Only unique within a single document
Uniqueness not guaranteed across multiple documents
Only a single attribute uniqueness (no composite keys)
Combination of x and y coordinates cannot be declared unique
Note
Uniqueness quite restrictive compared to DBMS technology
XML Schema lifts most limitations on uniqueness
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 22 / 37
25. Empty Elements with Attributes
Example (Empty)
<!ELEMENT coor EMPTY>
<! ATTLIST coor cid ID #REQUIRED
x CDATA #REQUIRED
y CDATA #REQUIRED
z CDATA #IMPLIED>
Example (Allowed?)
<coor/>
<coor cid=’c1’ x=’1’ y=’1’ z=’1’/>
<coor cid=’c2’ x=’2’ y=’2’></coor>
<coor cid=’c3’ x=’3’ y=’3’> </coor>
<coor cid=’c4’ z=’4’ y=’4’ x=’4’/>
<coor z=’5’ y=’5’ x=’5’/>
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 23 / 37
26. Is something Wrong?
Example (Case 1)
<!ELEMENT coor EMPTY>
<! ATTLIST coor
cid ID
x CDATA #REQUIRED>
Example (Case 2!)
<!ELEMENT coor EMPTY>
<! ATTLIST coor
cid ID #IMPLIED
x CDATA #REQUIRED>
Example (Case 3!)
<!ELEMENT coor EMPTY>
<! ATTLIST coor
x CDATA #REQUIRED
cid ID #REQUIRED>
Example (Case 4)
<!ELEMENT coor EMPTY>
<! ATTLIST coor
cid ID ’ 42 ’
x CDATA #REQUIRED>
Example (Case 5)
<!ELEMENT coor (EMPTY)>
<! ATTLIST coor
cid ID #REQUIRED
x CDATA #REQUIRED>
Example (Case 6)
<!ELEMENT coor EMPTY>
<! ATTLIST coor
cid ID #REQUIRED
x ID #REQUIRED>
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 24 / 37
27. Summary: Attributes
General Syntax
<!ATTLIST element−name attribute−name type [DefaultValue]>
Often used types
Type Example
CDATA <!ATTLIST course id CDATA>
ID <!ATTLIST course id ID #REQUIRED>
Enumeration <!ATTLIST course id (OOP | DB)>
Defaults
Type Example
#REQUIRED <!ATTLIST course id ID #REQUIRED>
#IMPLIED <!ATTLIST course id CDATA #IMPLIED>
#FIXED <!ATTLIST course id CDATA #FIXED ”1”>
A value <!ATTLIST course id (OOP | DB) ”DB”>
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 25 / 37
28. Outline
1 Introduction
2 Elements
3 Attributes
4 DTD Find Errors
5 Putting it All Together
6 Summary
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 26 / 37
29. A Buggy DTD
Example (DTD With Five Errors)
<?xml version= ’ 1.0 ’>
<!ELEMENT users user+>
<!ELEMENT user ( firstname , lastname>
<!ELEMENT firstname (#PCDATA)>
<!ELEMENT lastname>
Two-Minutes Exercise
With your neighbor identify the errors in the DTD
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 27 / 37
30. A Buggy DTD
Example (DTD With Five Errors)
<?xml version= ’ 1.0 ’>
<!ELEMENT users user+>
<!ELEMENT user ( firstname , lastname>
<!ELEMENT firstname (#PCDATA)>
<!ELEMENT lastname>
Two-Minutes Exercise
With your neighbor identify the errors in the DTD
Example (The Corrected DTD)
<?xml version= ’ 1.0 ’ encoding= ’ utf −8 ’?>
<!ELEMENT users ( user )+>
<!ELEMENT user ( firstname , lastname )>
<!ELEMENT firstname (#PCDATA)>
<!ELEMENT lastname (#PCDATA)>
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 27 / 37
31. Outline
1 Introduction
2 Elements
3 Attributes
4 DTD Find Errors
5 Putting it All Together
6 Summary
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 28 / 37
32. Uncertain About Content
Example (DTD for Courses with Flexible Description)
<?xml version=” 1.0 ” encoding=”UTF−8” ?>
<!ELEMENT courses ( course )∗>
<!ELEMENT course (name, desc )>
<!ELEMENT name (#PCDATA)>
<!ELEMENT desc ANY>
Example (DTD for Courses with Flexible Description)
<?xml version=” 1.0 ” encoding=”UTF−8” ?>
<!DOCTYPE courses SYSTEM ” course . dtd ”>
<courses>
<course>
<name>OOP</name>
<desc>
<name>object−oriented</name>
<desc>programming</ desc>.
</ desc>
</ course>
</ courses>
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 29 / 37
33. A University Example, Setup
Example (DTD)
<?xml version=” 1.0 ” encoding=”UTF−8” ?>
<!ELEMENT u n i v e r s i t y ( courses ,
students ,
follows )>
<!ELEMENT courses ( course )+>
<!ELEMENT course (name)>
<! ATTLIST course cid ID #REQUIRED>
<!ELEMENT name (#PCDATA)>
<!ELEMENT students ( student )+>
<!ELEMENT student ( fname )>
<! ATTLIST student sid ID #REQUIRED>
<!ELEMENT fname (#PCDATA)>
<!ELEMENT follows ( takes )+>
<!ELEMENT takes EMPTY>
<! ATTLIST takes sid IDREF #REQUIRED>
<! ATTLIST takes cids IDREFS #REQUIRED>
Example (XML Fragment)
<u n i v e r s i t y>
<courses>
<course cid= ’C111 ’>
<name>DB</name>
</ course>
<course cid= ’C222 ’>
<name>OOP</name>
</ course>
</ courses>
<students>
<student sid= ’S11 ’>
<fname>Ann</ fname>
</ student>
<student sid= ’S22 ’>
<fname>Bart</ fname>
</ student>
<student sid= ’S33 ’>
<fname>Curt</ fname>
</ student>
</ students>
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 30 / 37
34. A University Example, Referencing
Example (DTD)
<?xml version=” 1.0 ” encoding=”UTF−8” ?>
<!ELEMENT u n i v e r s i t y ( courses ,
students ,
follows )>
<!ELEMENT courses ( course )+>
<!ELEMENT course (name)>
<! ATTLIST course cid ID #REQUIRED>
<!ELEMENT name (#PCDATA)>
<!ELEMENT students ( student )+>
<!ELEMENT student ( fname )>
<! ATTLIST student sid ID #REQUIRED>
<!ELEMENT fname (#PCDATA)>
<!ELEMENT follows ( takes )+>
<!ELEMENT takes EMPTY>
<! ATTLIST takes sid IDREF #REQUIRED>
<! ATTLIST takes cids IDREFS #REQUIRED>
Example (XML Fragment)
<follows>
<takes sid= ’S11 ’ cids= ’C111 C222 ’ />
<takes sid= ’S22 ’ cids= ’C222 ’ />
<takes sid= ’S33 ’ cids= ’C111 ’ />
</ follows>
Note
ID cannot start with digit
sid is a single ID
cids is a set of IDs
No overlap between IDs
Separator is space (not ,)
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 31 / 37
35. Quiz: IDREFS
Example (University XML)
<u n i v e r s i t y>
<courses>
<course cid= ’C111 ’>
<name>DB</name>
</ course>
<course cid= ’C222 ’>
<name>OOP</name>
</ course>
</ courses>
<students>
<student sid= ’S11 ’>
<fname>Ann</ fname>
</ student>
<student sid= ’S22 ’>
<fname>Bart</ fname>
</ student>
<student sid= ’S33 ’>
<fname>Curt</ fname>
</ student>
</ students>
Example (Allowed One?)
<follows>
<takes sid= ’S11 ’ cids= ’C111 C222 C111 ’ />
</ follows>
Example (Allowed Two?)
<follows>
<takes sid= ’S11 ’ cids= ’C333 C222 C111 ’ />
</ follows>
Example (Allowed Three?)
<follows>
<takes sid= ’S11 ’ cids= ’C111 ’ />
<takes sid= ’S11 ’ cids= ’C222 ’ />
</ follows>
Example (Allowed Four?)
<follows>
<takes sid= ’S11 ’ cids= ’ ’ />
<takes sid= ’S22 ’ cids= ’ c111 ’ />
</ follows>
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 32 / 37
36. Using an Internal DTD
Example (DTD for Courses with Flexible Description)
<?xml version=” 1.0 ” standalone=” yes ” ?>
<!DOCTYPE courses [
<!ELEMENT courses ( course )∗>
<!ELEMENT course (name, desc )>
<!ELEMENT name (#PCDATA)>
<!ELEMENT desc ANY>
]>
<courses>
<course>
<name>OOP</name>
<desc>
<name>object−oriented</name>
<desc>programming</ desc>.
</ desc>
</ course>
</ courses>
Note
Benefit: All information in one file
Drawback: DTD is not reused (maintenance nightmare)
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 33 / 37
37. Outline
1 Introduction
2 Elements
3 Attributes
4 DTD Find Errors
5 Putting it All Together
6 Summary
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 34 / 37
38. Summary: DTD
Limitations
Only very basic data types supported
Only single-column keys (for uniqueness)
Uniqueness only guaranteed within a single document
Very limited support for integrity constraints
Note
DTD is widely used
DTD is being replaced by XML Schema when documents are complex
There are problems using XML Namespace and DTD
Advise
Never build a new DTD if an existing (standard) can be used!
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 35 / 37
39. RDBMS vs. XML
RDBMS vs. XML
Query Schema
SQL DML DDL
XML XQuery DTD/XML Schema
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 36 / 37
40. Summary: DTD versus XML Schema
DTD
Own format
Compact notation
Simple data types
From SGML
Support entities
No support namespaces
XML Schema
XML format
Very verbose
Advanced data types
Invented for XML
Does not support entities
Support namespaces
Advice
Start with a DTD
Move on to XML Schema for later iterations
Kristian Torp (Aalborg University) Introduction to DTD November 3, 2015 37 / 37