This is the first part (out of two) about basics of JavaScript.
01 What is Dynamic HTML?
02 What is JavaScript?
03 How to JavaScript?
04 JavaScript Syntax
05 JavaScript Basics
06 Conditional Statements
XSD Incomplete Overview Draft.
All fundamental concepts about XSD schemas and examples how to create a schema.
It was not made by me, it was handed over by someone else.
This is the first part (out of two) about basics of JavaScript.
01 What is Dynamic HTML?
02 What is JavaScript?
03 How to JavaScript?
04 JavaScript Syntax
05 JavaScript Basics
06 Conditional Statements
XSD Incomplete Overview Draft.
All fundamental concepts about XSD schemas and examples how to create a schema.
It was not made by me, it was handed over by someone else.
1. JavaScript inside Browser's Environment
- About Browsers
- Executing JavaScript
2. Working with Browser Objects
- Window
- Location
- History
- Navigator
- Screen
3. Document Object Model
4. Core DOM Objects
- Overview
- Node
- Document
- Element
- Attribute
5. HTML DOM Objects
6. DOM Travesal and Manipulations
- Seach element
- Change element
- Work with set of elements
7. Events
- Event types
- Event object
- Event Bubbling
8. jQuery basics
- Overview
- Selectors
9. HTML5 Demos
JSON Schema is an extremely powerful, yet easily approachable, tool for describing data structures. In fact, the OpenAPI has embraced JSON Schema and currently uses it for describing the inputs/outputs of your APIs. JSON Schema is a technology that is often misunderstood and often used in ways that leave people scratching their heads when it does not work the way they expected. This talk will introduce JSON Schema from the ground up, complete with gotchas and best practices. In the end, the hope is that the attendee will see the value of JSON Schema and understand it well enough to use in their OpenAPI documents and even their own applications.
https://youtu.be/r5SLk3XLOUs
In this presentation you will get to see how the Design mode can help both content authors who want to visualize or understand a schema and schema designers who develop complex schemas. You will also get the chance to learn:
- How to create JSON schemas from scratch
- How to use the new Pallet view to add new components
- How to use the drag-and-drop support to design your JSON Schema
- How to use refactoring actions
- How to visualize and edit complex JSON Schemas
https://www.oxygenxml.com/events/2021/webinar_the_new_json_schema_diagram_editor.html
A webinar in which we will show you how Oxygen now offers even more powerful tools that allow you to design, develop, and edit JSON Schemas. We will be focusing on presenting features ranging from the new intuitive and expressive visual schema Design mode, all the way up to the JSON Schema documentation generator that includes diagram images for each component.
During this live webinar, you will get the chance to take an in-depth look at all of these features, as well as learn:
How to create JSON Schemas from scratch
How to visualize and edit complex JSON Schemas
How to generate JSON Schema documentation
1. JavaScript inside Browser's Environment
- About Browsers
- Executing JavaScript
2. Working with Browser Objects
- Window
- Location
- History
- Navigator
- Screen
3. Document Object Model
4. Core DOM Objects
- Overview
- Node
- Document
- Element
- Attribute
5. HTML DOM Objects
6. DOM Travesal and Manipulations
- Seach element
- Change element
- Work with set of elements
7. Events
- Event types
- Event object
- Event Bubbling
8. jQuery basics
- Overview
- Selectors
9. HTML5 Demos
JSON Schema is an extremely powerful, yet easily approachable, tool for describing data structures. In fact, the OpenAPI has embraced JSON Schema and currently uses it for describing the inputs/outputs of your APIs. JSON Schema is a technology that is often misunderstood and often used in ways that leave people scratching their heads when it does not work the way they expected. This talk will introduce JSON Schema from the ground up, complete with gotchas and best practices. In the end, the hope is that the attendee will see the value of JSON Schema and understand it well enough to use in their OpenAPI documents and even their own applications.
https://youtu.be/r5SLk3XLOUs
In this presentation you will get to see how the Design mode can help both content authors who want to visualize or understand a schema and schema designers who develop complex schemas. You will also get the chance to learn:
- How to create JSON schemas from scratch
- How to use the new Pallet view to add new components
- How to use the drag-and-drop support to design your JSON Schema
- How to use refactoring actions
- How to visualize and edit complex JSON Schemas
https://www.oxygenxml.com/events/2021/webinar_the_new_json_schema_diagram_editor.html
A webinar in which we will show you how Oxygen now offers even more powerful tools that allow you to design, develop, and edit JSON Schemas. We will be focusing on presenting features ranging from the new intuitive and expressive visual schema Design mode, all the way up to the JSON Schema documentation generator that includes diagram images for each component.
During this live webinar, you will get the chance to take an in-depth look at all of these features, as well as learn:
How to create JSON Schemas from scratch
How to visualize and edit complex JSON Schemas
How to generate JSON Schema documentation
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
Games are powerful teaching tools, fostering hands-on engagement and fun. But they require careful consideration to succeed. Join me to explore factors in running and selecting games, ensuring they serve as effective teaching tools. Learn to maintain focus on learning objectives while playing, and how to measure the ROI of gaming in education. Discover strategies for pitching gaming to leadership. This session offers insights, tips, and examples for coaches, team leads, and enterprise leaders seeking to teach from simple to complex concepts.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
Cyaniclab : Software Development Agency Portfolio.pdfCyanic lab
CyanicLab, an offshore custom software development company based in Sweden,India, Finland, is your go-to partner for startup development and innovative web design solutions. Our expert team specializes in crafting cutting-edge software tailored to meet the unique needs of startups and established enterprises alike. From conceptualization to execution, we offer comprehensive services including web and mobile app development, UI/UX design, and ongoing software maintenance. Ready to elevate your business? Contact CyanicLab today and let us propel your vision to success with our top-notch IT solutions.
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaYara Milbes
Discover the transformative power of the WhatsApp API in our latest SlideShare presentation, "Top 7 Unique WhatsApp API Benefits." In today's fast-paced digital era, effective communication is crucial for both personal and professional success. Whether you're a small business looking to enhance customer interactions or an individual seeking seamless communication with loved ones, the WhatsApp API offers robust capabilities that can significantly elevate your experience.
In this presentation, we delve into the top 7 distinctive benefits of the WhatsApp API, provided by the leading WhatsApp API service provider in Saudi Arabia. Learn how to streamline customer support, automate notifications, leverage rich media messaging, run scalable marketing campaigns, integrate secure payments, synchronize with CRM systems, and ensure enhanced security and privacy.
3. 3 www.ExigenServices.com
XML
• Is a standart for EXtensible Markup Language
• Is a markup language much like HTML
• XML was designed to describe data
• XML tags are not predefined. You must define your own tags
• XML uses a Document Type Definition (DTD) or an
XML Schema to describe the data
5. 5 www.ExigenServices.com
XML SYNTAX
• XML declaration (standart and encoding)
• Can be comment (is inserted in tags <!-- comment -->)
• Element
• Child elements
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--DOCTYPE note SYSTEM "InternalNote.dtd“-->
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
XML Example:
6. 6 www.ExigenServices.com
XML TAGS
• All XML documents must have closing a tag
<element> this is an element </element>
<element1>this is another element </element1>
• XML tags are case sensitive
<!– correct -->
<element> this is an element </element>
<!– wrong -->
<element1>this is another element </Element1>
• All XML documents must be properly nested
<!– correct -->
<b><i> this text is bold and italic </i></b>
<!– wrong -->
<b><i> this text is bold and italic </b></i>
8. 8 www.ExigenServices.com
XML ELEMENTS NAMING
• XML elements have the different content type
<book>
<title>BOOK TITLE</title>
<prod id="33-657"
media="paper"></prod>
<chapter>CHAPTER ONE
<para>paragraph 1</para>
<para>paragraph 2</para>
</chapter>
<chapter>CHAPTER TWO
<para>paragraph 1</para>
</chapter>
</book>
9. 9 www.ExigenServices.com
XML ATTRIBUTES
• Attribute values must always be enclosed in quotes
<person sex="female">
• If the attribute value itself contains double quotes it is necessary
to use single quotes
or <person sex=‘female’>
<gangster name='George "Shotgun" Ziegler'>
• If the attribute value itself contains single quotes it is necessary
to use double quotes
<gangster name=“George ‘Shotgun’ Ziegler”>
10. 10 www.ExigenServices.com
XML ATTRIBUTES
• The following example defines an element called "age" with a restriction.
The value of age cannot be lower than 0 or greater than 120:
<xs:element name="age">
< xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="120"/>
</xs:restriction>
< /xs:simpleType>
< /xs:element>
11. 11 www.ExigenServices.com
DTD SCHEME
• Attribute’s type and property
<!ATTLIST message
number CDATA #REQUIRED
date CDATA #REQUIRED
from CDATA #FIXED
status CDATA #IMPLIED>
• Elements and attributes should be described in DTD in order they used in
XML
• DTD can be defined in XML in second line
<?xml version="1.0" ?>
<!DOCTYPE mailbox SYSTEM "mailbox.dtd">
12. 12 www.ExigenServices.com
DTD EXAMPLE
<!ELEMENT mailbox (message*)>
<!ELEMENT message (head, body)>
<!ATTLIST message uid CDATA #REQUIRED>
<!ELEMENT head ( from,to+, subject?, CC*,
notify?) >
<!ELEMENT from (#PCDATA)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT subject (#PCDATA)>
<!ELEMENT CC (#PCDATA)>
<!ELEMENT notify EMPTY>
<!ELEMENT body (#PCDATA)>
<?xml version="1.0" ?>
<!DOCTYPE mailbox SYSTEM
"mailbox.dtd">
<mailbox>
<message uid="1">
<head>
<from>user1@myhp.edu</from>
<to>user2@myhp.edu</to>
<subject>Re:</subject>
</head>
<body> What's up! </body>
</message>
<message uid="2">
…
</message>
</mailbox>
DTD XML
14. 14 www.ExigenServices.com
XML tools
• XML on-line validators
http://www.w3schools.com/dom/dom_validate.asp
• XML validators
XML ValidatorBuddy
• XML tools:
• Stylus Studio
• XML Notepad
• XML Copy Editor
• Exchanger XML Lite
• XMLPad
• XML Spy
15. 15 www.ExigenServices.com
RESOLUTION
• XML was designed to carry data.
• XML has it’s own syntax
• XML should has a scheme
• XML document contains elements and attributes
• XML document has tags
• XML document is easy to create and validate
16. 16 www.ExigenServices.com
<?xml version="1.0" encoding="WINDOWS-1251"?>
<?xml-stylesheet type='text/xsl' href='ex01-1.xsl'?>
<tutorial>
<title>“Introduction to XML"</title>
<author>Bob Hitch</author>
</toturial>
WRONG OR CORRECT
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-16&quot;?&gt; will give an error message
Elements can be simple and complex.
Simple element is an XML element that can contain only text. It cannot contain any other elements or attributes.
However, the &quot;only text&quot; restriction is quite misleading. The text can be of many different types. It can be one of the types included in the XML Schema definition (boolean, string, date, etc.), or it can be a custom type that you can define yourself.
You can also add restrictions (facets) to a data type in order to limit its content, or you can require the data to match a specific pattern.
The syntax for defining a simple element is:
&lt; xs:element name=&quot;xxx&quot; type=&quot;yyy&quot;/&gt;
where xxx is the name of the element and yyy is the data type of the element.
XML Schema has a lot of built-in data types. The most common types are:
xs:string
xs:decimal
xs:integer
xs:boolean
xs:date
xs:time
Example
Here are some XML elements:
&lt; lastname&gt;Refsnes&lt;/lastname&gt;&lt; age&gt;36&lt;/age&gt;&lt; dateborn&gt;1970-03-27&lt;/dateborn&gt;
And here are the corresponding simple element definitions:
&lt; xs:element name=&quot;lastname&quot; type=&quot;xs:string&quot;/&gt;&lt; xs:element name=&quot;age&quot; type=&quot;xs:integer&quot;/&gt;&lt; xs:element name=&quot;dateborn&quot; type=&quot;xs:date&quot;/&gt;
Simple elements may have a default value OR a fixed value specified.
A default value is automatically assigned to the element when no other value is specified.
In the following example the default value is &quot;red&quot;:
&lt; xs:element name=&quot;color&quot; type=&quot;xs:string&quot; default=&quot;red&quot;/&gt;
A fixed value is also automatically assigned to the element, and you cannot specify another value.
In the following example the fixed value is &quot;red&quot;:
&lt; xs:element name=&quot;color&quot; type=&quot;xs:string&quot; fixed=&quot;red&quot;/&gt;
A complex element is an XML element that contains other elements and/or attributes.
There are four kinds of complex elements:
empty elements
elements that contain only other elements
elements that contain only text
elements that contain both other elements and text
Examples of Complex Elements
A complex XML element, &quot;product&quot;, which is empty:
&lt; product pid=&quot;1345&quot;/&gt;
A complex XML element, &quot;employee&quot;, which contains only other elements:
&lt; employee&gt;&lt; firstname&gt;John&lt;/firstname&gt;&lt; lastname&gt;Smith&lt;/lastname&gt;&lt; /employee&gt;
A complex XML element, &quot;food&quot;, which contains only text:
&lt; food type=&quot;dessert&quot;&gt;Ice cream&lt;/food&gt;
A complex XML element, &quot;description&quot;, which contains both elements and text:
&lt; description&gt;It happened on &lt;date lang=&quot;norwegian&quot;&gt;03.03.99&lt;/date&gt; ....&lt; /description&gt;
How to Define a Complex Element
Look at this complex XML element, &quot;employee&quot;, which contains only other elements:
&lt; employee&gt;&lt; firstname&gt;John&lt;/firstname&gt;&lt; lastname&gt;Smith&lt;/lastname&gt;&lt; /employee&gt;
We can define a complex element in an XML Schema two different ways:
1. The &quot;employee&quot; element can be declared directly by naming the element, like this:
&lt; xs:element name=&quot;employee&quot;&gt;&lt;xs:complexType&gt;&lt;xs:sequence&gt;&lt;xs:element name=&quot;firstname&quot; type=&quot;xs:string&quot;/&gt;&lt;xs:element name=&quot;lastname&quot; type=&quot;xs:string&quot;/&gt;&lt;/xs:sequence&gt;&lt;/xs:complexType&gt;&lt; /xs:element&gt;
If you use the method described above, only the &quot;employee&quot; element can use the specified complex type. Note that the child elements, &quot;firstname&quot; and &quot;lastname&quot;, are surrounded by the &lt;sequence&gt; indicator. This means that the child elements must appear in the same order as they are declared. You will learn more about indicators in the XSD Indicators chapter.
2. The &quot;employee&quot; element can have a type attribute that refers to the name of the complex type to use:
&lt; xs:element name=&quot;employee&quot; type=&quot;personinfo&quot;/&gt;&lt; xs:complexType name=&quot;personinfo&quot;&gt;&lt;xs:sequence&gt;&lt;xs:element name=&quot;firstname&quot; type=&quot;xs:string&quot;/&gt;&lt;xs:element name=&quot;lastname&quot; type=&quot;xs:string&quot;/&gt;&lt;/xs:sequence&gt;&lt; /xs:complexType&gt;
If you use the method described above, several elements can refer to the same complex type, like this:
&lt; xs:element name=&quot;employee&quot; type=&quot;personinfo&quot;/&gt;&lt; xs:element name=&quot;student&quot; type=&quot;personinfo&quot;/&gt;&lt; xs:element name=&quot;member&quot; type=&quot;personinfo&quot;/&gt;&lt; xs:complexType name=&quot;personinfo&quot;&gt;&lt;xs:sequence&gt;&lt;xs:element name=&quot;firstname&quot; type=&quot;xs:string&quot;/&gt;&lt;xs:element name=&quot;lastname&quot; type=&quot;xs:string&quot;/&gt;&lt;/xs:sequence&gt;&lt; /xs:complexType&gt;
You can also base a complex element on an existing complex element and add some elements, like this:
&lt; xs:element name=&quot;employee&quot; type=&quot;fullpersoninfo&quot;/&gt;&lt; xs:complexType name=&quot;personinfo&quot;&gt;&lt;xs:sequence&gt;&lt;xs:element name=&quot;firstname&quot; type=&quot;xs:string&quot;/&gt;&lt;xs:element name=&quot;lastname&quot; type=&quot;xs:string&quot;/&gt;&lt;/xs:sequence&gt;&lt; /xs:complexType&gt;&lt; xs:complexType name=&quot;fullpersoninfo&quot;&gt;&lt;xs:complexContent&gt;&lt;xs:extension base=&quot;personinfo&quot;&gt;&lt;xs:sequence&gt;&lt;xs:element name=&quot;address&quot; type=&quot;xs:string&quot;/&gt;&lt;xs:element name=&quot;city&quot; type=&quot;xs:string&quot;/&gt;&lt;xs:element name=&quot;country&quot; type=&quot;xs:string&quot;/&gt;&lt;/xs:sequence&gt;&lt;/xs:extension&gt;&lt;/xs:complexContent&gt;&lt; /xs:complexType&gt;
Complex Types Containing Elements Only
An XML element, &quot;person&quot;, that contains only other elements:
&lt; person&gt;&lt; firstname&gt;John&lt;/firstname&gt;&lt; lastname&gt;Smith&lt;/lastname&gt;&lt; /person&gt;
You can define the &quot;person&quot; element in a schema, like this:
&lt; xs:element name=&quot;person&quot;&gt;&lt;xs:complexType&gt;&lt;xs:sequence&gt;&lt;xs:element name=&quot;firstname&quot; type=&quot;xs:string&quot;/&gt;&lt;xs:element name=&quot;lastname&quot; type=&quot;xs:string&quot;/&gt;&lt;/xs:sequence&gt;&lt;/xs:complexType&gt;&lt; /xs:element&gt;
Notice the &lt;xs:sequence&gt; tag. It means that the elements defined (&quot;firstname&quot; and &quot;lastname&quot;) must appear in that order inside a &quot;person&quot; element.
Or you can give the complexType element a name, and let the &quot;person&quot; element have a type attribute that refers to the name of the complexType (if you use this method, several elements can refer to the same complex type):
&lt; xs:element name=&quot;person&quot; type=&quot;persontype&quot;/&gt;&lt; xs:complexType name=&quot;persontype&quot;&gt;&lt;xs:sequence&gt;&lt;xs:element name=&quot;firstname&quot; type=&quot;xs:string&quot;/&gt;&lt;xs:element name=&quot;lastname&quot; type=&quot;xs:string&quot;/&gt;&lt;/xs:sequence&gt;&lt; /xs:complexType&gt;
Complex Types with Mixed Content
An XML element, &quot;letter&quot;, that contains both text and other elements:
&lt; letter&gt;Dear Mr.&lt;name&gt;John Smith&lt;/name&gt;.Your order &lt;orderid&gt;1032&lt;/orderid&gt;will be shipped on &lt;shipdate&gt;2001-07-13&lt;/shipdate&gt;.&lt; /letter&gt;
The following schema declares the &quot;letter&quot; element:
&lt; xs:element name=&quot;letter&quot;&gt;&lt;xs:complexType mixed=&quot;true&quot;&gt;&lt;xs:sequence&gt;&lt;xs:element name=&quot;name&quot; type=&quot;xs:string&quot;/&gt;&lt;xs:element name=&quot;orderid&quot; type=&quot;xs:positiveInteger&quot;/&gt;&lt;xs:element name=&quot;shipdate&quot; type=&quot;xs:date&quot;/&gt;&lt;/xs:sequence&gt;&lt;/xs:complexType&gt;&lt; /xs:element&gt;
Note: To enable character data to appear between the child-elements of &quot;letter&quot;, the mixed attribute must be set to &quot;true&quot;. The &lt;xs:sequence&gt; tag means that the elements defined (name, orderid and shipdate) must appear in that order inside a &quot;letter&quot; element.
We could also give the complexType element a name, and let the &quot;letter&quot; element have a type attribute that refers to the name of the complexType (if you use this method, several elements can refer to the same complex type):
&lt; xs:element name=&quot;letter&quot; type=&quot;lettertype&quot;/&gt;&lt; xs:complexType name=&quot;lettertype&quot; mixed=&quot;true&quot;&gt;&lt;xs:sequence&gt;&lt;xs:element name=&quot;name&quot; type=&quot;xs:string&quot;/&gt;&lt;xs:element name=&quot;orderid&quot; type=&quot;xs:positiveInteger&quot;/&gt;&lt;xs:element name=&quot;shipdate&quot; type=&quot;xs:date&quot;/&gt;&lt;/xs:sequence&gt;&lt; /xs:complexType&gt;
XML elements can have different content type: element content, mixed content, Simple content or empty content or element can have attribute.
Simple elements cannot have attributes. If an element has attributes, it is considered to be of a complex type. But the attribute itself is always declared as a simple type.
Element “title” has content type, element “prod” doesn’t have any type but has an attribute.
Element “chapter” has content and mixed type.
Element “para” has content type.
Element “book” and “chapter”ia a parent element and has child elements.
The attribute named id has the value &quot;33-657&quot;. The attribute named media has the value &quot;paper&quot;.
Example
Here is an XML element with an attribute:
&lt; lastname lang=&quot;EN&quot;&gt;Smith&lt;/lastname&gt;
And here is the corresponding attribute definition:
&lt; xs:attribute name=&quot;lang&quot; type=&quot;xs:string&quot;/&gt;
Default and Fixed Values for Attributes
Attributes may have a default value OR a fixed value specified.
A default value is automatically assigned to the attribute when no other value is specified.
In the following example the default value is &quot;EN&quot;:
&lt; xs:attribute name=&quot;lang&quot; type=&quot;xs:string&quot; default=&quot;EN&quot;/&gt;
A fixed value is also automatically assigned to the attribute, and you cannot specify another value.
In the following example the fixed value is &quot;EN&quot;:
&lt; xs:attribute name=&quot;lang&quot; type=&quot;xs:string&quot; fixed=&quot;EN&quot;/&gt;
Optional and Required Attributes
Attributes are optional by default. To specify that the attribute is required, use the &quot;use&quot; attribute:
&lt; xs:attribute name=&quot;lang&quot; type=&quot;xs:string&quot; use=&quot;required&quot;/&gt;
Restrictions on Content
When an XML element or attribute has a data type defined, it puts restrictions on the element&apos;s or attribute&apos;s content.
If an XML element is of type &quot;xs:date&quot; and contains a string like &quot;Hello World&quot;, the element will not validate.
With XML Schemas, you can also add your own restrictions to your XML elements and attributes. These restrictions are called facets. You can read more about facets in the next chapter.
To limit the content of an XML element to a set of acceptable values, we would use the enumeration constraint.
The example below defines an element called &quot;car&quot; with a restriction. The only acceptable values are: Audi, Golf, BMW:
&lt; xs:element name=&quot;car&quot;&gt;&lt; xs:simpleType&gt;&lt;xs:restriction base=&quot;xs:string&quot;&gt;&lt;xs:enumeration value=&quot;Audi&quot;/&gt;&lt;xs:enumeration value=&quot;Golf&quot;/&gt;&lt;xs:enumeration value=&quot;BMW&quot;/&gt;&lt;/xs:restriction&gt;&lt; /xs:simpleType&gt;&lt; /xs:element&gt;
The example above could also have been written like this:
&lt; xs:element name=&quot;car&quot; type=&quot;carType&quot;/&gt;&lt; xs:simpleType name=&quot;carType&quot;&gt;&lt;xs:restriction base=&quot;xs:string&quot;&gt;&lt;xs:enumeration value=&quot;Audi&quot;/&gt;&lt;xs:enumeration value=&quot;Golf&quot;/&gt;&lt;xs:enumeration value=&quot;BMW&quot;/&gt;&lt;/xs:restriction&gt;&lt; /xs:simpleType&gt;
Note: In this case the type &quot;carType&quot; can be used by other elements because it is not a part of the &quot;car&quot; element.
To limit the content of an XML element to define a series of numbers or letters that can be used, we would use the pattern constraint.
The example below defines an element called &quot;letter&quot; with a restriction. The only acceptable value is ONE of the LOWERCASE letters from a to z:
&lt; xs:element name=&quot;letter&quot;&gt;&lt; xs:simpleType&gt;&lt;xs:restriction base=&quot;xs:string&quot;&gt;&lt;xs:pattern value=&quot;[a-z]&quot;/&gt;&lt;/xs:restriction&gt;&lt; /xs:simpleType&gt;&lt;/xs:element&gt;
The next example defines an element called &quot;initials&quot; with a restriction. The only acceptable value is THREE of the UPPERCASE letters from a to z:
&lt; xs:element name=&quot;initials&quot;&gt;&lt; xs:simpleType&gt;&lt;xs:restriction base=&quot;xs:string&quot;&gt;&lt;xs:pattern value=&quot;[A-Z][A-Z][A-Z]&quot;/&gt;&lt;/xs:restriction&gt;&lt; /xs:simpleType&gt;&lt;/xs:element&gt;
The next example also defines an element called &quot;initials&quot; with a restriction. The only acceptable value is THREE of the LOWERCASE OR UPPERCASE letters from a to z:
&lt; xs:element name=&quot;initials&quot;&gt;&lt; xs:simpleType&gt;&lt;xs:restriction base=&quot;xs:string&quot;&gt;&lt;xs:pattern value=&quot;[a-zA-Z][a-zA-Z][a-zA-Z]&quot;/&gt;&lt;/xs:restriction&gt;&lt; /xs:simpleType&gt;&lt;/xs:element&gt;
The next example defines an element called &quot;choice&quot; with a restriction. The only acceptable value is ONE of the following letters: x, y, OR z:
&lt; xs:element name=&quot;choice&quot;&gt;&lt; xs:simpleType&gt;&lt;xs:restriction base=&quot;xs:string&quot;&gt;&lt;xs:pattern value=&quot;[xyz]&quot;/&gt;&lt;/xs:restriction&gt;&lt; /xs:simpleType&gt;&lt;/xs:element&gt;
The next example defines an element called &quot;prodid&quot; with a restriction. The only acceptable value is FIVE digits in a sequence, and each digit must be in a range from 0 to 9:
&lt; xs:element name=&quot;prodid&quot;&gt;&lt; xs:simpleType&gt;&lt;xs:restriction base=&quot;xs:integer&quot;&gt;&lt;xs:pattern value=&quot;[0-9][0-9][0-9][0-9][0-9]&quot;/&gt;&lt;/xs:restriction&gt;&lt; /xs:simpleType&gt;&lt;/xs:element&gt;
Other Restrictions on a Series of Values
The example below defines an element called &quot;letter&quot; with a restriction. The acceptable value is zero or more occurrences of lowercase letters from a to z:
&lt; xs:element name=&quot;letter&quot;&gt;&lt; xs:simpleType&gt;&lt;xs:restriction base=&quot;xs:string&quot;&gt;&lt;xs:pattern value=&quot;([a-z])*&quot;/&gt;&lt;/xs:restriction&gt;&lt; /xs:simpleType&gt;&lt;/xs:element&gt;
The next example also defines an element called &quot;letter&quot; with a restriction. The acceptable value is one or more pairs of letters, each pair consisting of a lower case letter followed by an upper case letter. For example, &quot;sToP&quot; will be validated by this pattern, but not &quot;Stop&quot; or &quot;STOP&quot; or &quot;stop&quot;:
&lt; xs:element name=&quot;letter&quot;&gt;&lt; xs:simpleType&gt;&lt;xs:restriction base=&quot;xs:string&quot;&gt;&lt;xs:pattern value=&quot;([a-z][A-Z])+&quot;/&gt;&lt;/xs:restriction&gt;&lt; /xs:simpleType&gt;&lt;/xs:element&gt;
The next example defines an element called &quot;gender&quot; with a restriction. The only acceptable value is male OR female:
&lt; xs:element name=&quot;gender&quot;&gt;&lt; xs:simpleType&gt;&lt;xs:restriction base=&quot;xs:string&quot;&gt;&lt;xs:pattern value=&quot;male|female&quot;/&gt;&lt;/xs:restriction&gt;&lt; /xs:simpleType&gt;&lt;/xs:element&gt;
The next example defines an element called &quot;password&quot; with a restriction. There must be exactly eight characters in a row and those characters must be lowercase or uppercase letters from a to z, or a number from 0 to 9:
&lt; xs:element name=&quot;password&quot;&gt;&lt; xs:simpleType&gt;&lt;xs:restriction base=&quot;xs:string&quot;&gt;&lt;xs:pattern value=&quot;[a-zA-Z0-9]{8}&quot;/&gt;&lt;/xs:restriction&gt;&lt; /xs:simpleType&gt;&lt;/xs:element&gt;
The DTD describes a scheme for a particular document markup language using a set of declarations (objects, options, elements and attributes) that describe its class (or type) in terms of syntactic constraints of this document.
DTD may also declare constructs that are always needed to determine the structure of the document, but, but may influence the interpretation of certain documents.
The attribute named id has the value &quot;33-657&quot;. The attribute named media has the value &quot;paper&quot;. REQUIRED – attribute should be identified. FIXED - attribute should be fixed. IMPLIED - attribute can be unengaging.
There are some default properties:
1.IMPLIED - attribute is optional;
2.REQUIRED - the attribute value must be indicated;
3.FIXED - the value of this attribute is specified as a constant in the DTD and the document can not be changed;
4.nekotoroe specific value, which is used by default.
The attribute named id has the value &quot;33-657&quot;. The attribute named media has the value &quot;paper&quot;.
Declare elements form a list of authorized names of elements in the document and determine the information on the tags (if they are mandatory) and the content model for each element.
Different keys words and symbols define the contents of:
EMPTY - empty the contents of
ANY - any content
- Specifies the order
| - Separation of alternatives
() - Grouping
* - Any number of items (zero or more)
+ - At least one element (one or more)
? - Availability of an optional element (zero or one)
If there is no, * +, or? - The item should be only one
There are some types of attributes:
CDATA (Character set of data) - the attribute value can be any character data
ID - the attribute value must be a unique identifier for the element
IDREF - the element value is a reference to an element by its ID
IDREFS - Same as IDREF, but with the possibility of links is not one identifier, and for several
NMTOKEN - an attribute value can be a sequence of characters, in some ways similar to the name (hence the name - name token). This is a string that contains any combination of those characters that are allowed to use names for XML.
NMTOKENS - the attribute value is a list of values
ENTITY - the value used to refer to an external entity.
ENTITIES - allows you to specify a list of external entities, separated by spaces.
NOTATION - the attribute value can be one of the previously defined notations
NOTATIONS - allows you to specify a list of notations.
Listings and NOTATION-listings
ENUMERATION - sets a list of possible alternative values.
There are some default properties:
1.IMPLIED - attribute is optional;
2.REQUIRED - the attribute value must be indicated;
3.FIXED - the value of this attribute is specified as a constant in the DTD and the document can not be changed;
4.nekotoroe specific value, which is used by default.
What is an XML Schema?
The purpose of an XML Schema is to define the legal building blocks of an XML document, just like a DTD.
An XML Schema:
defines elements that can appear in a document
defines attributes that can appear in a document
defines which elements are child elements
defines the order of child elements
defines the number of child elements
defines whether an element is empty or can include text
defines data types for elements and attributes
defines default and fixed values for elements and attributes
XML Schemas are the Successors of DTDs
We think that very soon XML Schemas will be used in most Web applications as a replacement for DTDs. Here are some reasons:
XML Schemas are extensible to future additions
XML Schemas are richer and more powerful than DTDs
XML Schemas are written in XML
XML Schemas support data types
XML Schemas support namespaces
XML Schema is a W3C Recommendation
XML Schema became a W3C Recommendation 02. May 2001.
You can read more about the XML Schema standard in our W3C tutorial.
We believe that very soon XML-schema to be used in Web-based applications instead of the DTD-tables, and here&apos;s why:
XML-schemas easier to learn than DTD
XML-schema can be expanded in the future if needed to add some
XML-Schema is richer and more useful than DTD
XML-schema written in XML
XML-Schema data typing support
XML-schema namespace support
&lt;xs:element name=&quot;to&quot; type=&quot;xs:string&quot;/&gt; - is a simple element
&lt;xs:element name=&quot;note&quot;&gt; - is a complex element
XML Schema has a lot of built-in data types. The most common types are:
xs:string
xs:decimal
xs:integer
xs:boolean
xs:date
xs:time
Order indicators are used to define the order of the elements.
All Indicator
The &lt;all&gt; indicator specifies that the child elements can appear in any order, and that each child element must occur only once:
&lt; xs:element name=&quot;person&quot;&gt;&lt;xs:complexType&gt;&lt;xs:all&gt;&lt;xs:element name=&quot;firstname&quot; type=&quot;xs:string&quot;/&gt;&lt;xs:element name=&quot;lastname&quot; type=&quot;xs:string&quot;/&gt;&lt;/xs:all&gt;&lt;/xs:complexType&gt;&lt; /xs:element&gt;
Note: When using the &lt;all&gt; indicator you can set the &lt;minOccurs&gt; indicator to 0 or 1 and the &lt;maxOccurs&gt; indicator can only be set to 1 (the &lt;minOccurs&gt; and &lt;maxOccurs&gt; are described later).
Choice Indicator
The &lt;choice&gt; indicator specifies that either one child element or another can occur:
&lt; xs:element name=&quot;person&quot;&gt;&lt;xs:complexType&gt;&lt;xs:choice&gt;&lt;xs:element name=&quot;employee&quot; type=&quot;employee&quot;/&gt;&lt;xs:element name=&quot;member&quot; type=&quot;member&quot;/&gt;&lt;/xs:choice&gt;&lt;/xs:complexType&gt;&lt; /xs:element&gt;
Sequence Indicator
The &lt;sequence&gt; indicator specifies that the child elements must appear in a specific order:
&lt; xs:element name=&quot;person&quot;&gt;&lt;xs:complexType&gt;&lt;xs:sequence&gt;&lt;xs:element name=&quot;firstname&quot; type=&quot;xs:string&quot;/&gt;&lt;xs:element name=&quot;lastname&quot; type=&quot;xs:string&quot;/&gt;&lt;/xs:sequence&gt;&lt;/xs:complexType&gt;&lt; /xs:element&gt;
XML Schemas Support Data Types
One of the greatest strength of XML Schemas is the support for data types.
With support for data types:
It is easier to describe allowable document content
It is easier to validate the correctness of data
It is easier to work with data from a database
It is easier to define data facets (restrictions on data)
It is easier to define data patterns (data formats)
It is easier to convert data between different data types
XML Schemas use XML Syntax
Another great strength about XML Schemas is that they are written in XML.
Some benefits of that XML Schemas are written in XML:
You don&apos;t have to learn a new language
You can use your XML editor to edit your Schema files
You can use your XML parser to parse your Schema files
You can manipulate your Schema with the XML DOM
You can transform your Schema with XSLT
XML Schemas Secure Data Communication
When sending data from a sender to a receiver, it is essential that both parts have the same &quot;expectations&quot; about the content.
With XML Schemas, the sender can describe the data in a way that the receiver will understand.
A date like: &quot;03-11-2004&quot; will, in some countries, be interpreted as 3.November and in other countries as 11.March.
However, an XML element with a data type like this:
&lt;date type=&quot;date&quot;&gt;2004-03-11&lt;/date&gt;
ensures a mutual understanding of the content, because the XML data type &quot;date&quot; requires the format &quot;YYYY-MM-DD&quot;.
XML Schemas are Extensible
XML Schemas are extensible, because they are written in XML.
With an extensible Schema definition you can:
Reuse your Schema in other Schemas
Create your own data types derived from the standard types
Reference multiple schemas in the same document
Well-Formed is not Enough
A well-formed XML document is a document that conforms to the XML syntax rules, like:
it must begin with the XML declaration
it must have one unique root element
start-tags must have matching end-tags
elements are case sensitive
all elements must be closed
all elements must be properly nested
all attribute values must be quoted
entities must be used for special characters
Even if documents are well-formed they can still contain errors, and those errors can have serious consequences.
Think of the following situation: you order 5 gross of laser printers, instead of 5 laser printers. With XML Schemas, most of these errors can be caught by your validating software.
XML is Text-based
XML is a text-based markup language.
One great thing about XML is that XML files can be created and edited using a simple text-editor like Notepad.
However, when you start working with XML, you will soon find that it is better to edit XML documents using a professional XML editor.
Why Not Notepad?
Many web developers use Notepad to edit both HTML and XML documents because Notepad is included with the most common OS and it is simple to use. Personally I often use Notepad for quick editing of simple HTML, CSS, and XML files.
But, if you use Notepad for XML editing, you will soon run into problems.
Notepad does not know that you are writing XML, so it will not be able to assist you.
Why an XML Editor?
Today XML is an important technology, and development projects use XML-based technologies like:
XML Schema to define XML structures and data types
XSLT to transform XML data
SOAP to exchange XML data between applications
WSDL to describe web services
RDF to describe web resources
XPath and XQuery to access XML data
SMIL to define graphics
To be able to write error-free XML documents, you will need an intelligent XML editor!
XML Editors
Professional XML editors will help you to write error-free XML documents, validate your XML against a DTD or a schema, and force you to stick to a valid XML structure.
An XML editor should be able to:
Add closing tags to your opening tags automatically
Force you to write valid XML
Verify your XML against a DTD
Verify your XML against a Schema
Color code your XML syntax