Declarative Languages EXAM Flashcards

1
Q

What does XML stand for?

A

Extensible Markup Language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are HTML and XML based on?

A

Standard Generalized Markup Language (SGML)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the difference between HTML and XML?

A

HTML is about how to present the data, XML is about the data itself

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What version of XML does this course focus on?

A

Version 1.0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you specify a comment in XML?

A

< !– The comment – >

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you specify unparsed character data?

A

< ![CDATA[ ]] >

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Are XML elements case sensitive?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What part of an XML doc is like metadata?

A

Attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Elements are thought of as ______ and attributes as ______

A

Nouns, Adjectives

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Is the XML Declaration required?

A

No, but recommended

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

If the version isn’t specified in the declaration, what version is assumed?

A

Latest version (1.1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is an entity?

A

A way to specify a special character and not have it parsed.
&

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does the DOM do?

A

Provides a way to query and manipulate XML documents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does the DOM structure an XML document?

A

a Tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does the DOM standard define a set of?

A

Interfaces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the fundamental interface in the DOM?

A

Node

17
Q

What is a NamedNodeMap typically used for?

A

Attributes

18
Q

What type of Node supports Attributes in the DOM?

A

Element

19
Q

How many children does an Attr Node have?

A

Exactly 1

20
Q

What does the Document class inherit from in the DOM?

A

Node

21
Q

What type of XML schema has become the standard?

A

XSD

22
Q

What is the XML document that a schema applies to?

A

Instance Document

23
Q

What are the 2 basic parts of an XML schema?

A
  1. Data types
  2. Structures
24
Q

What do schema definitions do?

A

Create new types

25
Q

What do schema declarations do?

A

Describe content models of elements and attributes in document instances

26
Q

What is the URL of the schema in the preamble?

A

http://www.w3.org/2001/XMLSchema

27
Q

What 2 ways can you associate a schema with a document?

A
  1. parser
  2. schemaLocation or noNamespaceSchemaLocation attribute
28
Q

What are the 4 primary schema components?

A
  1. Element declarations
  2. Simple Type definitions
  3. Complex Type definitions
  4. Attribute declarations
29
Q

What is the syntax of an element declaration?

A

< xsd:element name=”name” type=”type” minOccurs=”int” maxOccurs=”int”/ >

30
Q

In an element declaration, the maxOccurs attribute can be a positive int or what?

A

unbounded

31
Q

All XML schema data types are comprised of what 3 parts?

A
  1. Value space
  2. Lexical space
  3. Set of Facets
32
Q

What is a complex type?

A

A set of attribute declarations and content type that pertain to the attributes and children of the element

33
Q

What 2 places can attribute declarations be placed?

A
  1. Globally scoped within the < schema > element
  2. Within a complex type declaration