- integrates LexEv (which now reports internal and parameter entities, along with CDATA sections, comments, numeric and entity refs, and the DOCTYPE)
- On OSX and linux, it uses the "Nimbus" look and feel, on Windows it still uses native
- includes the latest Saxon HE 9.3.0.2
- directory transforms: input directory structure is now recreated in the output directory
- files are correctly released, rather than held while Kernow is open
- the caching entity resolver now correctly load all files from the cache dir first
- updated to the latest Bounce version, which fixes some freezing in the sandboxes
- includes Xerces 2.10 which partially supports XSD 1.1
- fixed several small bugs
Thoughts on XSLT
Andrew Welch
Monday, January 10, 2011
Kernow 1.7 released
Monday, July 19, 2010
Kernow 1.7 beta available
- integrates LexEv (which now reports internal and parameter entities, along with CDATA sections, comments, numeric and entity refs, and the DOCTYPE)
- includes Saxon HE 9.2.1.1
- directory transforms: input directory structure is now recreated in the output directory
- files are correctly released, rather than held while Kernow is open
- the caching entity resolver now correctly load all files from the cache dir first
- updated to the latest Bounce version (enabling "folding" in the sandboxes)
- includes Xerces 2.9.0 which partially supports XSD 1.1
- fixed several small bugs
Tuesday, November 17, 2009
Mark Logic adds XSLT support
Monday, September 14, 2009
XML Schema 1.1 tutorials
One tutorial is for developers, the other for managers which contains more general wordy descriptions of the benefits of 1.1
Friday, August 22, 2008
Some sample templates for use with LexEv
If your XML has been parsed using LexEv, here are some sample templates for handling the LexEv markup.
To output an entity reference:
<xsl:template match="lexev:entity">
<xsl:value-of disable-output-escaping="yes" select="concat('&', @name, ';')"/>
</xsl:template>
To process a CDATA section as markup:
<xsl:template match="lexev:cdata">
<xsl:apply-templates/>
</xsl:template>
To output a DOCTYPE from the processing instructions:
In XSLT 1.0 the doctype-public and doctype-system attributes on xsl:output
are static and need to be known at compile time, which means I'm afraid you have to do this:
<xsl:template match="/">
<xsl:value-of disable-output-escaping="yes"
select="concat('<!DOCTYPE ', name(/*), '
 PUBLIC "',
processing-instruction('doctype-public'), '" "',
processing-instruction('doctype-system'), '">')"/>
<xsl:apply-templates/>
</xsl:template>
In XSLT 2.0 you can use xsl:result-document
where the doctype-public and doctype-system are AVTs which mean their values can be determined at runtime:
<xsl:template match="/">
<xsl:result-document
doctype-public="{processing-instruction('doctype-public')}"
doctype-system="{processing-instruction('doctype-system')}">
<xsl:apply-templates/>
</xsl:result-document>
</xsl:template>
Thursday, August 21, 2008
LexEv XMLReader - converts lexical events into markup
- Converting cdata sections into markup:
<![CDATA[ <p> a para <p> ]]>
to:
<lexev:cdata> <p> a para </p> </lexev:cdata>
- Preserving entity references:
hello—world
is converted to:
hello<lexev:entity name="mdash">—</lexev:entity>world
- Preserving the doctype declaration:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">is converted to processing instructions:
<?doctype-public -//W3C//DTD XHTML 1.0 Transitional//EN?>
<?doctype-system http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd?> - Marking up comments:
<!-- a comment -->
is converted to:
<lexev:comment> a comment </lexev:comment>
To use LexEvXMLReader with Saxon:
java -cp saxon9.jar;LexEvXMLReader.jar net.sf.saxon.Transform -x:com.andrewjwelch.lexev.LexEvXMLReader input.xml
stylesheet.xslt
Make sure LexEvXMLReader.jar
is on the classpath, and then tell Saxon to use it with the -x switch (copy and paste this line -x:com.andrewjwelch.lexev.LexEvXMLReader
)
To use LexEvXMLReader from Java:
XMLReader xmlReader = new LexEvXMLReader();
You can control the following features of LexEv:
- enable/disable the marking up of entity references
- enable/disable the marking up of CDATA sections
- set the default namespace for the CDATA section markup
- enable/disable the reporting of the DOCTYPE
- enable/disable the marking up of comments
You can set these through the API (if you are including LexEv in an application), or from the command line using the following system properties:
com.andrewjwelch.lexev.inline-entities
com.andrewjwelch.lexev.cdata
com.andrewjwelch.doctype.cdataNamespace
com.andrewjwelch.lexev.doctype
com.andrewjwelch.lexev.comments
For example to set a system property from the command line you would use: -Dcom.andrewjwelch.lexev.comments=false
For support, suggestions and licensing, email lexev@andrewjwelch.com
Friday, July 18, 2008
Kernow 1.6.1
Notable things in this release:
- Line numbers on the editor panes in the sandboxes (thanks to a new version of Bounce). You might not think so, but getting line numbers down the side of the editor pane is really involved. It's like block indenting (pressing tab or shift-tab when a block of text is selected) in that it's very low level and requires a lot of coding. Why it's not an intergral part of the editor pane I don't know...
- Improved the syntax-checking-as-you-type and highlighting, and added the ability to disable it.
- The output area is now also a JEditorPane using Bounce so it supports tag highlighting. This might slow things down because now it's an HTML document where every addition is inserted at the end of the document, instead of just appending to a JTextArea... if this proves to be A Bad Thing I'll revert it back to a plain old text area with plain text.
- You can now select which tabs are visible (in options -> tabs) so if you never use certain tabs (like Batch or Schematron) you can remove them.
- If you have Saxon SA you can use XML Schema 1.1 (options -> validation)
- Improved the parameters dialog to make it less fiddly to enter params
- Slight graphical tweaks and likely other things that I've forgotten...