2005-12-10 23:03:57

4XSLT initialization and XSLT pattern tools

These are the most common steps for using this XSLT engine:

1. Create an Ft.Xml.Xslt.Processor.Processor instance:

from Ft.Xml.Xslt import Processor processor = Processor.Processor()

2. Prepare Ft.Xml.InputSource instances (via their factory) for the source XML and for the stylesheet.

3. Call the Processor's appendStylesheet() method, passing it the stylesheet's InputSource.

4. Call the Processor's run() method, passing it the source document's InputSource.

You can call run() multiple times on different InputSources. When you're done, the processor's reset() method can be used to restore a clean slate (at which point you would have to append stylesheets to the processor again), but in most circumstances it is actually less expensive to just create a new Processor instance.

Copyright 2003 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Implementation of the XSLT Spec apply-imports stylesheet element. WWW: http://4suite.org/4XSLT e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

Implementation of xsl:apply-templates instruction

Copyright 2004 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Implementation of xsl:attribute element

Copyright 2003 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Classes that support validation and evaluation of attribute values in XSLT instruction elements

Copyright 2003 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Implementation of the XSLT Spec attribute-set stylesheet element. WWW: http://4suite.org/4XSLT e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

Implementation of XSLT attribute value templates

Copyright 2003 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Fourthought proprietary XSLT extension elements

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

4XSLT specific extension functions (i.e. ones that create a node set)

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Implementation of the XSLT Spec call-template stylesheet element. WWW: http://4suite.org/4XSLT e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

Implementation of the XSLT Spec choose instruction WWW: http://4suite.org/4XSLT e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

Implementation of the XSLT Spec comment stylesheet element. WWW: http://4suite.org/4XSLT e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

Implementation of the XSLT Spec copy stylesheet element. WWW: http://4suite.org/4XSLT e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

Implementation of the XSLT Spec copy-of element. WWW: http://4suite.org/4XSLT e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

DOM DocumentFragment writer for XSLT output

Much inspired by RtfWriter.

Copyright (c) 2000-2001 Alexandre Fayolle (France).

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation.

THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Implementation of xsl:element element

Copyright 2003 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Extended versions of XSLT elements for debugging and execution tracing

These subclasses typically just override the .instantiate method of the original class, doing something before calling the original method, like writing debug or trace output and maintaining whatever state info is necessary in the process.

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Implementation of the XSLT Spec for-each stylesheet element. WWW: http://4suite.org/4XSLT e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

Base implementation of XSLT variable assigning elements

Copyright 2002 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

HTML writer for XSLT processor output

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Implementation of the XSLT Spec if instruction WWW: http://4suite.org/4XSLT e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

Implementation of XSLT literal result elements

Copyright 2003 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Implementation of the XSLT Spec import stylesheet element. WWW: http://4suite.org/4XSLT e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

XSLT error codes and messages

Copyright 2003 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Interface definition for XSLT output writers

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Implementation of xsl:number

Copyright 2003 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Non-template instructions from the XSLT spec WWW: http://4suite.org/4XSLT e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

Manages XSLT output parameters governed by the xsl:output instruction See also Ft.Xml.Xslt.OutputParameters

Copyright 2004 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Represents XSLT output parameters governed by the xsl:output instruction See also Ft.Xml.Xslt.OutputHandler

Copyright 2003 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Implementation of the XSLT Spec param stylesheet element. WWW: http://4suite.org/4XSLT e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

Plain text writer for XSLT processor output

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Implementation of the XSLT Spec processing-instruction stylesheet element. WWW: http://4suite.org/4XSLT e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

XSLT processing engine

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Light-weight functions to convert from Roman-Numerals to ints, and vice-versa.

Result Tree Fragment writer for XSLT output

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

SAX2 event writer for XSLT output

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

xsl:sort implementation

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

A specialized XSLT output writer that only captures text output events

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

xsl:stylesheet / xsl:transform implementation; various stylesheet internals

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Stylesheet tree generator

Copyright 2004 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Classes for the creation of a stylesheet object

Copyright 2004 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Node classes for the stylesheet tree

Copyright 2004 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Implementation of the XSLT Spec template stylesheet element. WWW: http://4suite.org/4XSLT e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

Implementation of the xsl:text element.

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Components for reading Text files from a SAX-like producer. WWW: http://4suite.org/4DOM e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

Node classes for the stylesheet tree

Copyright 2004 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Implementation of the xsl:value-of element.

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Implementation of the XSLT Spec variable stylesheet element. WWW: http://4suite.org/4XSLT e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

Implementation of the XSLT Spec with-param stylesheet element. WWW: http://4suite.org/4XSLT e-mail: support@4suite.org

Copyright (c) 1999-2001 Fourthought Inc, USA. All Rights Reserved. See http://4suite.org/COPYRIGHT for license and copyright information

Implement Patterns according to the XSLT spec

Copyright 1999-2004 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

XML writer for XSLT output

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Context and state information for XSLT processing

Copyright 2003 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Standard XSLT functions

Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

4XSLT command-line application

Collection of constants making up the categories of XSLT element

- 0
- 2
- 1

PatternList is a class that is useful for people writing code to process XSLT patterns, especially in groups.

patterns - A list of strings that make up either compiled pattern objects or valid XSLT patterns in string form. It must be either all of one form or all of another namespaces - A namespace dictionary - { prefix: uri, ... } - to be used for setting up expressions in the pattern

Return the patterns that match the node (as a list)

Returns the patterns that match the node (as a set [dictionary])

A special utility used for XSLT key preparation. A list of lists is returned. The outer list corresponds to the patterns. Each inner list is either [node] or [] depending on whether or not the node matched the corresponding pattern.

- <Ft.Xml.Xslt.XPatternParser object>

The exception raised when an error is encountered during the parsing of a stylesheet. This eliminates the need for location information within each error message.

Convenience function for applying an XSLT transform. Returns a string.

source - XML source document in the form of a a string (not Unicode object), file-like object (stream), file path, URI or Ft.Xml.InputSource.InputSource instance. If string or stream it must be self-contained XML (i.e. not requiring access to any other resource such as external entities or includes) stylesheet - XSLT document in the form of a string, stream, URL, file path or Ft.Xml.InputSource.InputSource instance

u'http://www.w3.org/1999/XSL/Transform'