Join Joe Marini for an in-depth discussion in this video Declaring attributes, part of XML Essential Training.
…Now that we have looked at declaring elements with schema, let's…take a look at how we would declare attributes with schema.…Like elements, attributes are declared using their own element…in schema and that happens to be the attribute tag.…Attributes, unlike elements, are always simple types.…There's no complex types for attributes in schema.…Any of the simple types that you saw in the earlier…tables that I showed, can be used for elements can also be used for attributes.…
So recall from that table, we had values like…string, and boolean, and date, and URI, and so on.…And any of those types you can also use in attribute declarations.…So here's a simple example.…This tag declares an attribute named h and its type is an integer.…And in addition…to the name and the type, you can place an attribute called use on your attribute.…Use can have one of three values.…It can be optional, which case the…attribute can be either included or omitted.…
It can be required, which means, the attribute has to be there.…Otherwise, it's an error.…
- What is XML?
- The advantages and drawbacks of XML
- Proper XML syntax
- Working with namespaces
- Styling XML tags with CSS
- Extracting and manipulating data
- Taking XPath and XSLT for a spin
- Creating document type definitions and schema definitions
Skill Level Beginner
1. Getting Started
2. How Developers Use XML
Real-world examples of XML6m 21s
3. Basic Rules of XML
4. Starting to Work with XML
5. Using the DOM to Manipulate XML
6. XML and XPath
7. XML and XSLT
8. XSLT Examples
9. Creating Document Type Definitions (DTDs)
10. Creating XML Schema Definitions
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.