ZPT-Sharp  v1.0.0
Zope Page Templates for .NET
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
CSF.Zpt.DocumentProviders.ZptXmlDocument Class Reference

Implementation of ZptDocument based on a System.Xml.XmlDocument. More...

Inheritance diagram for CSF.Zpt.DocumentProviders.ZptXmlDocument:
Collaboration diagram for CSF.Zpt.DocumentProviders.ZptXmlDocument:

Public Member Functions

XmlDocument RenderXml (IRenderingSettings options=null, Action< IModelValueContainer > contextConfigurator=null)
 Renders the document to an System.Xml.XmlDocument instance. More...
 
XmlDocument RenderXml (object model, IRenderingSettings options=null, Action< IModelValueContainer > contextConfigurator=null)
 Renders the document to an System.Xml.XmlDocument instance. More...
 
override IMetalMacroContainer GetMacros ()
 Gets a collection of elements in the document which are defined as METAL macros. More...
 
override ISourceInfo GetSourceInfo ()
 Gets information about the source medium for the current instance More...
 
 ZptXmlDocument (XmlDocument document, ISourceInfo sourceFile, IElementRenderer elementRenderer=null)
 Initializes a new instance of the CSF.Zpt.DocumentProviders.ZptXmlDocument class. More...
 
- Public Member Functions inherited from CSF.Zpt.ZptDocument
virtual string Render (IRenderingSettings options=null, Action< IModelValueContainer > contextConfigurator=null)
 Renders the document to a System.String. More...
 
virtual void Render (TextWriter writer, IRenderingSettings options=null, Action< IModelValueContainer > contextConfigurator=null)
 Renders the document to the given System.IO.TextWriter. More...
 
virtual string Render (object model, IRenderingSettings options=null, Action< IModelValueContainer > contextConfigurator=null)
 Renders the document to a System.String. More...
 
virtual void Render (object model, TextWriter writer, IRenderingSettings options=null, Action< IModelValueContainer > contextConfigurator=null)
 Renders the document to the given System.IO.TextWriter. More...
 
 ZptDocument (IElementRenderer elementRenderer=null)
 Initializes a new instance of the CSF.Zpt.ZptDocument class. More...
 

Protected Member Functions

override void Render (TextWriter writer, IZptElement element, IRenderingSettings options)
 Renders an element to the given System.IO.TextWriter. More...
 
override IZptElement GetRootElement ()
 Creates a rendering model from the current instance. More...
 
override IRenderingSettings GetDefaultOptions ()
 Gets an instance of IRenderingSettings which represents the default options. More...
 
- Protected Member Functions inherited from CSF.Zpt.ZptDocument
virtual IRenderingSettings GetOptions (IRenderingSettings options)
 Gets a set of rendering options, or constructs a default set of options if a null reference is passed. More...
 
virtual TElement ConvertElement< TElement > (IZptElement element)
 Converts the given IZptElement to an implementation-specific subclass, or raises an exception if the conversion is not valid. More...
 
virtual IZptElement RenderElement (object model, IRenderingSettings options, Action< IModelValueContainer > contextConfigurator)
 Coordinates logic to the IElementRenderer. More...
 

Properties

virtual XmlDocument Document [get]
 Gets the original XML document. More...
 
virtual ISourceInfo SourceFile [get]
 Gets information about the document's source file. More...
 
override RenderingMode Mode [get]
 Gets the RenderingMode for which the current document type caters. More...
 
bool IndentOutput [get, set]
 Gets or sets a value indicating whether to output indented XML or not. More...
 
string IndentationCharacters [get, set]
 Gets or sets a character string representing the indentation. More...
 
- Properties inherited from CSF.Zpt.ZptDocument
abstract RenderingMode Mode [get]
 Gets the RenderingMode for which the current document type caters. More...
 
virtual IElementRenderer ElementRenderer [get]
 Gets the element renderer for the current instance. More...
 
- Properties inherited from CSF.Zpt.IZptDocument
RenderingMode Mode [get]
 Gets the RenderingMode for which the current document type caters. More...
 

Detailed Description

Implementation of ZptDocument based on a System.Xml.XmlDocument.

Constructor & Destructor Documentation

CSF.Zpt.DocumentProviders.ZptXmlDocument.ZptXmlDocument ( XmlDocument  document,
ISourceInfo  sourceFile,
IElementRenderer  elementRenderer = null 
)
inline

Initializes a new instance of the CSF.Zpt.DocumentProviders.ZptXmlDocument class.

Parameters
documentAn XML document from which to create the current instance.
sourceFileInformation about the document's source file.
elementRendererThe element renderer.

Member Function Documentation

override IRenderingSettings CSF.Zpt.DocumentProviders.ZptXmlDocument.GetDefaultOptions ( )
inlineprotectedvirtual

Gets an instance of IRenderingSettings which represents the default options.

Returns
The default options.

Implements CSF.Zpt.ZptDocument.

override IMetalMacroContainer CSF.Zpt.DocumentProviders.ZptXmlDocument.GetMacros ( )
inlinevirtual

Gets a collection of elements in the document which are defined as METAL macros.

Returns
Elements representing the METAL macros.

Implements CSF.Zpt.ZptDocument.

override IZptElement CSF.Zpt.DocumentProviders.ZptXmlDocument.GetRootElement ( )
inlineprotectedvirtual

Creates a rendering model from the current instance.

Returns
The rendering model.

Implements CSF.Zpt.ZptDocument.

override ISourceInfo CSF.Zpt.DocumentProviders.ZptXmlDocument.GetSourceInfo ( )
inlinevirtual

Gets information about the source medium for the current instance

Returns
The source info.

Implements CSF.Zpt.ZptDocument.

override void CSF.Zpt.DocumentProviders.ZptXmlDocument.Render ( TextWriter  writer,
IZptElement  element,
IRenderingSettings  options 
)
inlineprotectedvirtual

Renders an element to the given System.IO.TextWriter.

Parameters
writerThe text writer to render to.
elementThe element to render.
optionsThe rendering options to use. If null then default options are used.

Implements CSF.Zpt.ZptDocument.

XmlDocument CSF.Zpt.DocumentProviders.ZptXmlDocument.RenderXml ( IRenderingSettings  options = null,
Action< IModelValueContainer contextConfigurator = null 
)
inline

Renders the document to an System.Xml.XmlDocument instance.

Returns
The rendered XML document.
Parameters
optionsThe rendering options to use. If null then default options are used.
contextConfiguratorAn optional action to perform upon the root IModelValueContainer, to configure it.
XmlDocument CSF.Zpt.DocumentProviders.ZptXmlDocument.RenderXml ( object  model,
IRenderingSettings  options = null,
Action< IModelValueContainer contextConfigurator = null 
)
inline

Renders the document to an System.Xml.XmlDocument instance.

Returns
The rendered XML document.
Parameters
modelAn object for which the ZPT document is to be applied.
optionsThe rendering options to use. If null then default options are used.
contextConfiguratorAn optional action to perform upon the root IModelValueContainer, to configure it.

Property Documentation

virtual XmlDocument CSF.Zpt.DocumentProviders.ZptXmlDocument.Document
get

Gets the original XML document.

The original XML document.

string CSF.Zpt.DocumentProviders.ZptXmlDocument.IndentationCharacters
getset

Gets or sets a character string representing the indentation.

The indentation characters.

bool CSF.Zpt.DocumentProviders.ZptXmlDocument.IndentOutput
getset

Gets or sets a value indicating whether to output indented XML or not.

true if the rendered output should be indented; otherwise, false.

override RenderingMode CSF.Zpt.DocumentProviders.ZptXmlDocument.Mode
get

Gets the RenderingMode for which the current document type caters.

The rendering mode.

virtual ISourceInfo CSF.Zpt.DocumentProviders.ZptXmlDocument.SourceFile
get

Gets information about the document's source file.

The source file.


The documentation for this class was generated from the following file: