You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,10 +144,12 @@ is not available such as in Node.js or in web workers.
144
144
XSLT-processor builds on Google's [AJAXSLT](https://github.com/4031651/ajaxslt) which was written before `XSLTProcessor()` became available in browsers, but the
145
145
code base has been updated to comply with ES2015+ and to make it work outside of browsers.
146
146
147
-
This implementation of XSLT operates at the DOM level on its input documents. It internally uses a DOM implementation to create the
148
-
output document, but usually returns the output document as text stream. The DOM to construct the output document can be supplied by
149
-
the application, or else an internal minimal DOM implementation is used. This DOM comes with a minimal XML parser that can be used to
150
-
generate a suitable DOM representation of the input documents if they are present as text.
147
+
This implementation of XSLT operates at the DOM level on its input documents.
148
+
It internally uses a DOM implementation to create the output document, but usually
149
+
returns the output document as text stream. The DOM to construct the output document can
150
+
be supplied by the application, or else an internal minimal DOM implementation is used. This
151
+
DOM comes with a minimal XML parser that can be used to generate a suitable DOM
152
+
representation of the input documents if they are present as text.
151
153
152
154
## Tests and usage examples
153
155
@@ -175,8 +177,12 @@ The implementation is all agnostic about namespaces. It just expects XSLT elemen
175
177
176
178
HTML per se is not strict XML. Because of that, starting on version 2.0.0, this library handles HTML differently than XML:
177
179
180
+
- For a document to be treated as HTML, it needs to have a `<!DOCTYPE>` tag defined with one of the two valid formats:
181
+
-`<!DOCTYPE html>` (for HTML5);
182
+
-`<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">` (for HTML4);
183
+
-`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">` (for XHTML 1.1).
178
184
- Tags like `<hr>`, `<link>` and `<meta>` don't need to be closed. The output for these tags doesn't close them (adding a `/` before the tag closes, or a corresponding close tag);
179
-
- This rule doesn't apply for XHTML, which is strict XML.
185
+
- This rule doesn't apply for XHTML, which is strict XML.
0 commit comments