Firefox/res/
.
Oxygen is a good XML editor, XSLT debugger, and XML file/dir diff.
Setup Oxygen
Detect indent on open.
Set tab-spacing
as desired.
insert caret
on the first blank line).
Add Edited File
in the project panel.
Save to your config directory. It will reopen whenever Oxygen launches.
Saxon is an XSLT and XSLT 2.0 processor
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
XSLT does not allow literal DOCTYPE declarations. Instead use the following
<xsl:output method="xhtml" doctype-system="http://www.w3.org/TR/html4/strict.dtd"
doctype-public="-//W3C//DTD HTML 4.01//EN" indent="yes" omit-xml-declaration="yes"/>
For other DOCTYPE's, see Choosing a DOCTYPE
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Language" content="en-us" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>....</title> <meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Language" content="en-us" /> </head> <body> ... </body> </html>
Some notes
col
element. It
recognizes width
, but not text-align
. Neither browser
supports colspan="0"
to span to the end of a colgroup.
<xsl:text
disable-output-escaping="yes">></xsl:text>
<!DOCTYPE root [
<!ENTITY nbsp " ">
]>
<!DOCTYPE root [
<!ENTITY chapter3 SYSTEM "chapters/chapter3.xml">
]>
...
&chapter3;
IE has a nice integration with Dev Studio for Javascript debugging.
Debug->Windows->Script Explorer
("Running
Documents" in DevStudio 2003). If it is not
available, use Tools->Import and Export Settings
to change your settings
to Web development
.
Script Explorer
should show your IE page. If not, close IE and start
over. You can set breakpoints in the
Javascript code, view
variables, etc.
h1 { text-align: left; margin-top: 20px; }
body {font: 1em verdana, arial, sans-serif;}
* {margin:0; padding:0;}
View style information
shows the class hierarchy and active definitions
for each element.
XSLT is an XML standard for transforming XML documents into XML, HTML, and text.
To quickly learn XSLT, read
XSLT 2.0 has many useful extensions, see
For .NET programming, see
XSLT 2.0 is a major upgrade of XSLT.
See
New features in XSLT 2.0
If the input document defines a default namespace, the XSLT must assign a namespace
prefix for its XPATH expressions. For example, an XHTML document requires
<xsl:stylesheet ... xmlns:xh="http://www.w3.org/1999/xhtml">
. Alternatively, in XSLT 2, define
xpath-default-namespace="..."
normalize-space(text())!=''
To associate an XML schema file, you need a schema name, a file path, and a namespace name. The schema name and namespace can be the same. For example, this file has the following root element:
<rf:topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.roadintranet.org/road-faq-1 ../xsl/road-faq.xsd"
xmlns:rf="http://schemas.roadintranet.org/road-faq-1"
Use HTML Tidy to convert raw html (e.g., with unclosed <p> and <li> tags) to xml. tidy file.html >file.xml
normalize-space(text())!=''
SQL Server 2000 introduced the 'for xml' output format for SELECT. SQL Server 2005 adds a number of improvements
:XML ON
and use sqlcmd
to run your query.
You must use a script file (sqlcmd assumes an interactive session if stdin contains
multiple lines)
For example
:XML ON select * from testcase_builds where build_id='2005_11_01-095320' and broke_prev is not null and fixed_prev is null order by testcase_id, machine for xml auto, root('rows') go
XML can represent information as attributes or elements. Attributes are more limited than elements. Attributes can not have children or sub-attributes. Attributes are unique within an element. Attributes are unordered. Attribute values may not contain a new-line.
Consider using attributes for metadata, identifiers, numeric data, and URLs.
Use elements for human readable text and data.
XML uses UTF-8 by default. For an explanation of the various character sets, including ASCII, HTML, and UTF, see
Cocoon is an XML web site engine that dynamically transforms XML data into web
pages. See
A data island is an <xml> element within an HTML document. Microsoft's InternetExplorer can parse data islands with its MSXML parser.
DocBook is an XML standard for
technical books and documentation. It is a "rich source of text markup and
structuring wisdom"
DOM is an in-memory, document object model for XML documents.
Using naming to communicate the data's structure. Avoid abbreviations, prefer
lower-case, hyphenate names, reuse names such as "head"
FOR XML is a Microsoft SQL Server extension for generating XML results from SQL queries.
OPENXML is a Microsoft SQL Server extension to insert rowsets from an XML document. Use it for small documents up to 50 KB in size.
XML Bulk Load is a COM component for loading database tables from XMLM.
NITF is an XML standard for news stories. It can define
"who the story is about, when and where the described event
occurred, and even why it is considered newsworthy by the story author
SVG is an XML-specifiction for vector
graphics. Batik is Apache's Java
implementation of SVG. Also consider Adobe Illustrator, Inkscape, and Imagemagick PfaEdit is a good font
editor for SVG fonts and other font formats.
An identifier servers multiple roles. The primary roles are reference and
summarization. Consider providing multiple names for the same entity. Use a
short name for internal reference, a short title for textual references, a URL for
external reference, a
descriptive title for headers and table of contents, and a full title for archival
purposes. To simplify textual references, convert references to lowercase
and strip all whitespace and punctuation. See Kirsanov for further advice
SQL 2003 included XML support, commonly called "SQL/XML". It appears that the ISO Standard has been withdrawn. Individual vendors have implemented different approaches.
select ... from ... where
... for xml raw('row'), root('builds")
SQLXML->bulk
loading
.
Using SQLXML Bulk Load in the .NET Environment
xmlns:sql="urn:schemas-microsoft-com:mapping-schema"
Using Annotations in XSD Schemas
Identifying Key Columns Using sql:key-fiel
Specifying Relationships Using sql:relationship
sql:datatype="dateTime"
. The same error message occurs
for SQL bulk load. In older versions of SQL Server, it may indicate missing columns.
XForm is an XML-based processing framework
for displaying, submitting, and processing forms.
XLink is an attribute-based syntax for attaching links to XML documents.
XML is a document markup standard, based on SGML.
Use XPath to return node sets from an XML document.
For .NET programming, see
XPathDocument is an optimized DOM model for processing XPATH expressions. Use CreateNavigator() to create an XPathNavigator object.
XPointer allows XPATH references in URLs.
XSD is the prefered XML schema format. It replaces DTD and XDR.
For programming .NET with XSD (e.g., SOAP) see
XSL-FO is an XML syntax for describing page layout.
CSS is a non-XML syntax for page layout
A master document is an XML configuration file that defines a web site, configuration, and site directory. Site documents use the master document to determine their context within a web site and to establish mutual links.
Use the
master document to associate short mnemonic identifiers with full titles and URLs
See
.NET allows embedded scripts inside XSL files. msxsl:script supersedes their xsl:eval extension.
MSXML is an older COM module for processing XML. It includes support for XSD, XML Schema and XPath.
XSLT templates may be invoked directly (push processing, e.g., xsl:for-each) or
indirectly (pull processing, e.g., xsl:apply-templates). A similar distinction
is trunk templates that define the highest level of document and branch templates
that define the leaves. Push processing is suitable for trunk templates while
pull processing works well for branch templates
An XML entity names a string value, e.g., &author;. It is defined within a !DOCTYPE node, e.g., <!DOCTYPE book [<!ENTITY author "Dino Esposito">]> It requires a XmlValidatingReader.
SAX is an event-based API for XML documents
SOAP is an XML standard for invoking web services.
For programming SOAP in .NET see
NameTable stores atomized strings for XMLDocument and XMLTextReader. Much faster than string comparisons.
.Net offers a variety of XML-enabled classes:
.NET Remoting is a non-XML alternative to SOAP. It is highly optimized for .NET-to-.NET communications, and replaces DCOM.
XML Document is Microsoft's DOM, memory-based representation of an XML document or fragment. It is a hierarchical structure of elements, attributes, and other nodes. See the .Net class XMLDocument. It is used for:
An XMLReader presents a stream input as a sequence of nodes. Use XMLReader for
An XMLWriter writes stream output as well-formed XML.
Meyer, O'Reilly, 2004, ISBN 0-596-00777-9
Flanagan, O'Reilly, 2003, ISBN 0-596-00411-7
Excellent coverage of JavaScript 1.5 by the author of The Definitive Guide
Flanagan, O'Reilly, 2001, ISBN: 0-596-00048-0
JavaScript reference. Well regarded.
Goodman, O'Reilly, 2003, ISBN 0-596-00467-2
Wyke-Smith, New Riders, 2005, ISBN 0-321-30525-6
Thorough introduction to CSS and XHTML. Recommended.
Box, Skonnard, and Lam, Addison Wesley, 2000.
A general look at XML as a unifying technology
Tidwell, O'Reilly 2001
Tidwell developed IBM's Toot-o-matic for IBM Tutorials. It generates HTML, PDF, ZIP, and JPEG files from one XML file. It's a good demonstration of XSLT, XSL:FO, and FOP. [page 212-236]
Appendix A, B, C contains a complete reference for XSLT and XPATH 1.0 with multiple examples illustrating each feature.
Esposito, Microsoft Press 2003
Thorough introduction to XML programming in .NET with best practices and lots of examples.
Fitzgerald, O'Reilly, 2003, ISBN: 0-596-00327-7
Excellent, thorough introduction to XSLT. Lots of examples.
Foggon, Maharry, Ullman, Watson, Microsoft, 2004
Step by step introduction to web services. Includes SOAP, WSDL, DISCO, UDDI, HTTP, XML Streaming, serialization, XSD, web methods. ADO.NET, security, WS-* standards,
Harold, Means, O'Reilly 2004, ISBN: 0-596-00764-7
Thorough introduction to XML including DTD, namespaces, XSLT, XPath, XLinks, XPointers, CSS, XSL-FO, RDDL, XSD, DOM, SAX
For XSLT and XPath,
Kay, Wiley, 2004, ISBN: 0-7645-6910-4
Definitive coverage of XPath 2.0 by the editor of the XSLT 2.0 specification.
Kay, Wiley, 2004, ISBN: 0-7645-6909-0
Definitive coverage of XSLT 2.0 by the editor of the XSLT 2.0 specification and the author of the Saxon XSLT engine. The introductory chapters are worth a careful read, as are the detailed examples in Chapters 9-12. Chapter 4 provides a quick introduction to XML Schema. Chapter 6, Patterns, provides a quick introduction to XPath. Chapter 5 provides complete definition and usage for each XSLT element.
Kirsanov, Prentice Hall, 2004, ISBN: 0-13-140635-3
Thorough introduction to developing web sites using XML, XSLT, and Schematron. Clear separation between processing and content. Lots of practical advice. Good use of a master document to configure a web site.
Lenz, O'Reilly, 2005, ISBN: 0-596-10050-7
Excellent reference guide to XSLT 1.0. Written from the XSLT specification.
Includes preliminary documentation on XSLT 2.0 -- a significant enhancement to XSLT.
Mangano, O'Reilly 2003
Advanced XSLT programming with lots of examples, many convoluted. Covers string manipuation, numbers and math, dates and times, XPATH, whitespace, XML transformation, XML queries, HTML generation, SVG generation, code generation, Visio VDX, Excel XML, SOAP WSDL documentation, XSLT extensions, testing, debugging, generic programming, and functional programming
Skonnard, Gudgin, Addison Wesley, 2001.
Annotated review of XML standards.
Stanek, Microsoft Press 2002, ISBN 0-7356-1183-1.
Stanek's book on XML.