Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
badw-it
DHParser
Commits
141f02ef
Commit
141f02ef
authored
Jun 16, 2018
by
eckhart
Browse files
- XML-Readme ergänzt
parent
e0e321fa
Changes
5
Hide whitespace changes
Inline
Side-by-side
examples/XML/README.md
View file @
141f02ef
...
...
@@ -22,3 +22,41 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
## Goals
*
create a non-validating XML-processor
*
parsing and compiling of XML-files into Element-Trees
*
serializing Element-Tress as XML
*
full support of valid any XML-file
*
round-trip: valid XML can be turned into an XML file and
serialized into XML again, without loss of data, i.e. re-parsing
yields the same element-tree ("structural identity").
## Optional (future) Goals
*
support all validity constraints mentioned in
https://www.w3.org/TR/REC-xml/
*
create validating XML-processor, i.e. support for DTDs, in particular
checking element tree against DTD
*
add a python-API for semantic checks à la schematron, only simpler ;-)
*
preservance of "insignificant whitespace", i.e. support
round-trip with "string-identity"
## Non-Goals
*
support for HTML
*
support of Carriage Return, i.e. Windows line endings...
## Status
+
Parses XML files, i.e. parser and AST-transformation are complete
+
simple XML files are compiled into an element-tree
-
limited support for CharData
-
no support for CDATA-sections
-
processing instrcutions not yet compiled
-
no processing of DTDs
examples/XML/docs/Extensible Markup Language (XML) 1.0 (Fifth Edition)-Dateien/W3C-REC.css
0 → 100644
View file @
141f02ef
/* Style for a "Recommendation" */
/*
Copyright 1997-2003 W3C (MIT, ERCIM, Keio). All Rights Reserved.
The following software licensing rules apply:
http://www.w3.org/Consortium/Legal/copyright-software */
/* $Id: base.css,v 1.32 2018/03/06 13:59:54 denis Exp $ */
body
{
padding
:
2em
1em
2em
70px
;
margin
:
0
;
font-family
:
sans-serif
;
color
:
black
;
background
:
white
;
background-position
:
top
left
;
background-attachment
:
fixed
;
background-repeat
:
no-repeat
;
}
:link
{
color
:
#00C
;
background
:
transparent
}
:visited
{
color
:
#609
;
background
:
transparent
}
a
:active
{
color
:
#C00
;
background
:
transparent
}
a
:link
img
,
a
:visited
img
{
border-style
:
none
}
/* no border on img links */
a
img
{
color
:
white
;
}
/* trick to hide the border in Netscape 4 */
@media
all
{
/* hide the next rule from Netscape 4 */
a
img
{
color
:
inherit
;
}
/* undo the color change above */
}
th
,
td
{
/* ns 4 */
font-family
:
sans-serif
;
}
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
text-align
:
left
}
/* background should be transparent, but WebTV has a bug */
h1
,
h2
,
h3
{
color
:
#005A9C
;
background
:
white
}
h1
{
font
:
170%
sans-serif
}
h2
{
font
:
140%
sans-serif
}
h3
{
font
:
120%
sans-serif
}
h4
{
font
:
bold
100%
sans-serif
}
h5
{
font
:
italic
100%
sans-serif
}
h6
{
font
:
small-caps
100%
sans-serif
}
.hide
{
display
:
none
}
div
.head
{
margin-bottom
:
1em
}
div
.head
h1
{
margin-top
:
2em
;
clear
:
both
}
div
.head
table
{
margin-left
:
2em
;
margin-top
:
2em
}
p
.copyright
{
font-size
:
small
}
p
.copyright
small
{
font-size
:
small
}
/** Outdated warning **********************************************************/
a
#outdated-note
{
color
:
white
;
}
a
#outdated-note
:hover
{
background
:
transparent
;
}
.outdated-spec
{
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
}
.outdated-warning
{
position
:
fixed
;
bottom
:
50%
;
left
:
0
;
right
:
0
;
margin
:
0
auto
;
width
:
50%
;
background
:
maroon
;
color
:
white
;
border-radius
:
1em
;
box-shadow
:
0
0
1em
red
;
padding
:
2em
;
text-align
:
center
;
z-index
:
2
;
}
.edited-rec-warning
{
background
:
darkorange
;
box-shadow
:
0
0
1em
;
}
.outdated-warning
button
{
position
:
absolute
;
top
:
0
;
right
:
0
;
margin
:
0
;
border
:
0
;
padding
:
0.25em
0.5em
;
background
:
transparent
;
color
:
white
;
font
:
1em
sans-serif
;
text-align
:
center
;
}
.outdated-warning
span
{
display
:
block
;
}
.outdated-collapsed
{
bottom
:
0
;
border-radius
:
0
;
width
:
100%
;
padding
:
0
;
}
@media
screen
{
/* hide from IE3 */
a
[
href
]
:hover
{
background
:
#ffa
}
}
pre
{
margin-left
:
2em
}
/*
p {
margin-top: 0.6em;
margin-bottom: 0.6em;
}
*/
dt
,
dd
{
margin-top
:
0
;
margin-bottom
:
0
}
/* opera 3.50 */
dt
{
font-weight
:
bold
}
ul
.toc
,
ol
.toc
{
list-style
:
disc
;
/* Mac NS has problem with 'none' */
list-style
:
none
;
}
@media
speech
{
h1
,
h2
,
h3
{
voice-stress
:
moderate
;
}
.hide
{
speak
:
none
;
}
p
.copyright
{
voice-volume
:
x-soft
;
voice-rate
:
x-fast
;
}
dt
{
pause-before
:
63ms
;
}
}
@media
print
{
.outdated-warning
{
position
:
absolute
;
border-style
:
solid
;
border-color
:
red
;
}
.outdated-warning
input
{
display
:
none
;
}
}
body
{
background-image
:
url(//www.w3.org/StyleSheets/TR/logo-REC)
;
}
examples/XML/docs/Extensible Markup Language (XML) 1.0 (Fifth Edition)-Dateien/fixup.js
0 → 100644
View file @
141f02ef
/******************************************************************************
* This code handles: *
* - the obsolete warning on outdated specs *
******************************************************************************/
(
function
()
{
"
use strict
"
;
var
ESCAPEKEY
=
27
;
/* Deprecation warning */
if
(
document
.
location
.
hostname
===
"
www.w3.org
"
)
{
var
request
=
new
XMLHttpRequest
();
request
.
open
(
'
GET
'
,
'
//www.w3.org/TR/tr-outdated-spec
'
);
request
.
onload
=
function
()
{
if
(
request
.
status
<
200
||
request
.
status
>=
400
)
{
return
;
}
try
{
var
currentSpec
=
JSON
.
parse
(
request
.
responseText
);
}
catch
(
err
)
{
console
.
error
(
err
);
return
;
}
document
.
body
.
classList
.
add
(
"
outdated-spec
"
);
var
w3cCSS
=
document
.
querySelector
(
'
link[href*="www.w3.org/StyleSheets/TR/W3C-"]
'
);
//old specs don't have the TR stylesheets
var
node
=
document
.
createElement
(
"
p
"
);
node
.
classList
.
add
(
"
outdated-warning
"
);
node
.
tabIndex
=
-
1
;
node
.
setAttribute
(
"
role
"
,
"
dialog
"
);
node
.
setAttribute
(
"
aria-modal
"
,
"
true
"
);
node
.
setAttribute
(
"
aria-labelledby
"
,
"
outdatedWarning
"
);
if
(
currentSpec
.
style
)
{
node
.
classList
.
add
(
currentSpec
.
style
);
}
var
frag
=
document
.
createDocumentFragment
();
var
heading
=
document
.
createElement
(
"
strong
"
);
heading
.
id
=
"
outdatedWarning
"
;
heading
.
innerHTML
=
currentSpec
.
header
;
frag
.
appendChild
(
heading
);
var
anchor
=
document
.
createElement
(
"
a
"
);
anchor
.
id
=
"
outdated-note
"
;
anchor
.
href
=
currentSpec
.
latestUrl
;
anchor
.
innerText
=
currentSpec
.
latestUrl
+
"
.
"
;
var
warning
=
document
.
createElement
(
"
span
"
);
warning
.
innerText
=
currentSpec
.
warning
;
warning
.
appendChild
(
anchor
);
frag
.
appendChild
(
warning
);
if
(
w3cCSS
)
{
var
button
=
document
.
createElement
(
"
button
"
);
var
handler
=
makeClickHandler
(
node
);
button
.
addEventListener
(
"
click
"
,
handler
);
button
.
innerHTML
=
"
▾ collapse
"
;
frag
.
appendChild
(
button
);
}
node
.
appendChild
(
frag
);
function
makeClickHandler
(
node
)
{
var
isOpen
=
true
;
return
function
collapseWarning
(
event
)
{
var
button
=
event
.
target
;
isOpen
=
!
isOpen
;
node
.
classList
.
toggle
(
"
outdated-collapsed
"
);
document
.
body
.
classList
.
toggle
(
"
outdated-spec
"
);
button
.
innerText
=
(
isOpen
)
?
'
\
u25BE collapse
'
:
'
\
u25B4 expand
'
;
}
}
document
.
body
.
appendChild
(
node
);
if
(
w3cCSS
)
{
button
.
focus
();
window
.
onkeydown
=
function
(
event
)
{
var
isCollapsed
=
node
.
classList
.
contains
(
"
outdated-collapsed
"
);
if
(
event
.
keyCode
===
ESCAPEKEY
&&
!
isCollapsed
)
{
button
.
click
();
}
}
document
.
addEventListener
(
"
focus
"
,
function
(
event
)
{
var
isCollapsed
=
node
.
classList
.
contains
(
"
outdated-collapsed
"
);
var
containsTarget
=
node
.
contains
(
event
.
target
);
if
(
!
isCollapsed
&&
!
containsTarget
)
{
event
.
stopPropagation
();
node
.
focus
();
}
},
true
);
// use capture to enable event delegation as focus doesn't bubble up
}
};
request
.
onerror
=
function
()
{
console
.
error
(
"
Request to https://www.w3.org/TR/tr-outdated-spec failed.
"
);
};
request
.
send
();
}
})();
examples/XML/docs/Extensible Markup Language (XML) 1.0 (Fifth Edition)-Dateien/w3c_home.png
0 → 100644
View file @
141f02ef
1.89 KB
examples/XML/docs/Extensible Markup Language (XML) 1.0 (Fifth Edition).html
0 → 100644
View file @
141f02ef
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment