XsltDb Reference


XsltDb getting started.

Database Access

mdo:sql ( sql, entity-names, [ param-1 [ ,...n ] ] )

Executes sql statement and get results back as XML or JSON. Allows multiple query results. Supports Result set caching in ASP.NET cache. Supports SqlCacheDependency. Supports dedicated portal database access Impersonating current thread with proper credentials.
read more...

mdo:xml ( procedure-name, entity-names, [param-1 [ ,...n ] )
Executes stored procedure {databaseOwner}[{objectQualifier}mdo_xslt_<<procedure-name>>]
read more...

mdo:save ( procedure-name, xml )
Similar to mdo:xml(...) but all parameters are encapsulated in XML. Intended to be used in update operations.
read more...

Visitor Interaction

mdo:submit ( [ validator, ] [ param-1-name, param-1-value [ ,...n] ] )
Sets parameters values and submits page. Within XSLT you may access parameters values with mdo:param extension.
read more...

mdo:ajax ( [ validator, ] [ param-1-name, param-1-value [ ,...n] ] )
Sets parameters values and executes XSLT using ajax without page submission. Within XSLT you may access parameters values with mdo:param extension.
read more...

mdo:navigate ( [ param-1-name, param-1-value [ ,...n] ] )
Sets parameters values and navigates to the current tab url. Parameters are put into query string of the url. Within XSLT you may access parameters values with mdo:param extension. This is the most SEO-friendly way to interact with visitor.
read more...

mdo:param ( param-name, [default-value] )
Returns value of the parameter, set by submit or ajax
read more...

mdo:login ( user-name, password )
Logs specified user in. Used to create alternative ways of login (via url hash, cookie, etc.).

mdo:userid ( user-name, password )
Checks the user-naem and password and if they match - returns user id, otherwise returns -1.

E-Mails

mdo:mail ( email-from, email-to, subject, html-body )
Sends HTML email to the recepient (email-to)

Services

Javascript Server Interfaces
If you want to create a javascript function that executes custom code on server use the following meta tag:
##handler:javascript_function_name(p1, p2, ...)
read more...

Inside the XsltDb module you can map a portion of xslt code to a javascript function using <mdo:callable /> tag
read more...

Web services
You can execute a particular module by ModuleID as a we bservice.
read more...

mdo:service
You can define multiple services inside single configuration using mdo:service.
read more...

mdo:service-url ( service-name )
Buids URL that correponds to service declared by mdo:service in current configuration.
read more...

mdo:node-set(xml, [period], [post-parameters])
Creates navigable XML in DOM format. read more...

DotNetNuke And ASP.NET Environment Access

mdo:request ( param-name, [default-value] )
Returns the value of form or query string parameter. Extension executes HttpContext.Current.Request[param-name].
read more

mdo:cookie ( param-name, [default-value] )
Returns the value of cookie. Extension executes HttpContext.Current.Request.Cookies[param-name].Value.

mdo:dnn ( property-path )
Returns a property of current portal, page, module or user.
read more...

mdo:tabid ( keyword, scope )
Returns an ID of a tab that have a keyword in name, title, description or keyword list.
read more...

mdo:is-in-role ( role-name )
Returns true if the role is assigned to the current user.

mdo:is-super-user()
Returns true if the current user is super user.

mdo:aspnet ( property-path )
Returns a value, associated with the current web context.
read more...

mdo:assign ( property-path, value )
Returns a value, associated with the current web context.
read more...

mdo:setup-outout-cache ( seconds, [location] )
Setups page-level output caching. At the moment caching is enabled only for anonimous access.
read more...

Adding modules to skin
If you need to put a block on each page you can easily reference an XsltDb configuration from skin or your user controls.
read more...

Formatted Output

mdo:format-number ( num, format )
mdo:format-date ( date, format, [input-format] )
Format number/date using format string. These extensions execute something like string.Format("{0{,|:}format}", number/date ) so format is standard .NET format string.
read more...

Localization

mdo:culture()
Returns curent culture. For example "en-US" or "ru-RU", etc.

#variable/key# pattern
Allows creating compact localized configuration.
read more...


mdo:resx(resx-file-base-name, string-key)
Searches resx file for localized value for the string.
read more...

File & Image Processing

Powerfull image processor allows you create thumbnails and convert image formats.

mdo:requestfile ( field-name )
Saves uploaded file and returns path to it. Checks for host allowed extensions.
read more...

mdo:deletefile ( path )
Deletes specified file.
read more...

mdo:thumbnail ( path, max-width, max-height )
Creates a thumbnail and returs virtual path to it.
read more...

mdo:image-size ( path )
mdo:portal-image-size ( path )
Calculates image dimensions and file size. Uses very fast algorithm for jpg, swf and flv
read more...

mdo:files ( path )
Returns list of files and folders at specified location.
read more...

mdo:virtualfile ( path )
Returns virtual path for the path returned by mdo:requestfile.

mdo:fileid ( path )
Returns id of the file.
read more...

Text processing

mdo:match ( text, regex-pattern )
Returns list of matches and matched groups in form of XML
read more...


mdo:split ( str, separator-pattern )
Splits string into serises of xml nodes
read more...

mdo:indexof ( source, pattern )
Returns index of first occurence of pattern in source using REGEX.

mdo:replace ( source, pattern, replacer )
Replaces pattern with the replacer in source using REGEX. $-group markers are allowed in replacer.

mdo:text ( xml )
Returns text representation of xml where xml is xpath query or any other xml source.

mdo:html ( xml )
Similar to mdo:text ( xml ) but formats output as HTML to display XML in browser in readable format.

String Encoding

  • mdo:html-encode ( text ), mdo:html-decode ( text )
  • mdo:url-encode ( text ), mdo:url-encode-unicode ( text ), mdo:url-decode ( text )
  • mdo:js-encode ( text ) javascript literal encoder, read more...
  • mdo:j-encode ( text ) javascript literal encoder, read more...

Additional syntax

Short form of xsl:value-of element
Instead of <xsl:value-of select="xpath" /> you may use {{xpath}}
read more...

Javascript Server Calls
If you want to create a javascript server handler use the following meta tag:
##handler:javascript_function_name(p1, p2, ...)
read more...

Manual Subscription
If you want to subscribe module to some parameter change you can write
##$param-name
read more...

Development tools

XSLT editors integration
You may use your favourite XSLT editor to directly edit XSLTs on your portal
read more...

DotNetNuke Integration

mdo:setup
Creates a settings form on the module's settings page
read more...

Other stuff

mdo:iif ( expression, if-true, if-false )
returns if-true if expression is true, otherwise returns if-false.

mdo:coalesce()
mdo:coalescenull()
Allows to choose first not-null value
read more

sequence ( from, to, step )
sequence ( count )
Return list values according to parameters. These extensions are used to execute loops without having an XML to iterate through.
read mode...

mdo:redirect()
mdo:redirect ( url )
Aborts request processing and sends a redirect instruction to browser
read more...

mdo:transfer ( virtual-path )
Transfers server-side execution process to new virtual path
read more...

mdo:date()
mdo:date ( format )
Returns curent date formatted as specifies (if it is).
read more...

mdo:today ( date )
Returns true if parameter date is current date.

.NET

mdo:net ( method, [ param-1, [ ,...n ] ] )
Creates instance of .NET class and executes specified method.
read more...

mdo:netcall ( instance, method, [ param-1, [ ,...n ] ] )
Invokes a method of an object returned by mdo:net.
read more...

Last edited Jul 4, 2011 at 6:33 PM by findy, version 40

Comments

No comments yet.