| XQUERY/XSLT API DOCUMENTATION 4.2 |
All XQuery & XSLT Functions MarkLogic Built-In Functions Admin (xdmp:) AppServer (xdmp:) Classifier (cts:) Debug (dbg:) Document Conversion (xdmp:) Extension (xdmp:) Documents, Directories, Properties, and Locks Functions Extension Functions Function Values Functions HTTP Functions JSON Functions MarkLogic Server Functions Search Functions XML Functions XQuery Context Functions XSLT Functions map (map:) Math (math:) Profile (prof:) Search (cts:) cts:query Constructors Functions Geospatial Functions Geospatial Lexicon Functions Lexicon Functions Search Functions Search Clustering Functions Security (xdmp:) Server Monitoring (xdmp:) Spell (spell:) Update (xdmp:) XQuery Library Modules Admin Library (admin:) Actions Functions Appserver Functions Database Functions Forest Functions Group Functions Host Functions Mimetypes Functions Scheduler Functions Alerting (alert:) Elastic Compute Cloud (ec2:) Entity Enrichment (entity:) Flexible Replication (flexrep:) Geospatial Supporting Functions GEO Functions GeoRSS Functions GML Functions KML Functions MCGM Functions Information Studio (info:) Information Studio Developer (infodev:) Library Services (dls:) cts:query Constructor Functions Document Management Functions Document Update Functions Retention Policy Functions XInclude Functions Modular Documents XInclude Functions XPointer Functions PKI (pki:) Plugin (plugin:) Search (search:) Security-sec (sec:) Spelling Dictionary Management (spell:) Thesaurus (thsr:) Triggers (trgr:) Triggers Library (trgr:) WordProcessingML (ooxml:) ZIP Package (ooxml:) CPF Functions Content Processing Framework (cpf:) CSS Conversion (css:) DocBook Conversion (dbk:) Domains (dom:) Excel Conversion (excel:) Generic Conversion (cvt:) Links (lnk:) MSWord Conversion (msword:) PDF Conversion (pdf:) Pipelines (p:) Powerpoint Conversion (ppt:) XHTML Conversion (xhtml:) W3C-Standard Functions Accessor (fn:) AnyURI (fn:) Boolean (fn:) Context (fn:) DurationDateTime (fn:) Error and Trace (fn:) Node (fn:) Numeric (fn:) QName (fn:) Sequence (fn:) String (fn:) XSLT (fn:) W3C XQuery/XSLT Reference W3C XQuery Functions W3C XQuery Language W3C XSLT Language
This page was generated September 12, 2012 6:01 AM | XQuery & XSLT Built-In & Modules Function Reference
Module: CSS Conversion
The CSS module is part of the conversion processing pipeline. These functions are used to manipulate CSS (Cascading style sheets) as part of conversion processing. To use the CSS module as part of your own XQuery module, include the following line in your XQuery prolog: `import module namespace css = "http://marklogic.com/cpf/css" at "/MarkLogic/conversion/css.xqy";` You will need to ensure that the CSS module is loaded into the same modules database as the importing module. The library namespace prefix `css` is not predefined in the server.
Function Summary
css:convert | Convert CSS text to an equivalent XML representation that is more suitable for analysis.
css:get | Fetch the CSS for the given document, be it embedded or linked.
Function Detail
css:convert(
| $css as xs:string,
| $options as element()?
) as element(css:styles)?
Summary: Convert CSS text to an equivalent XML representation that is more suitable for analysis.
Parameters:
$css : The CSS text itself.
$options : Options for the conversion. The following options are defined: "html-style", the name of the CSS class on the "html" element; "body-style", the name of the CSS class on the "body" element. These style names are used to improve weighting heuristics. The options are in the "css:convert" namespace.
Example:
      xquery version "1.0-ml";
      import module namespace css = "http://marklogic.com/cpf/css"
    		  at "/MarkLogic/conversion/css.xqy";

      css:convert( css:get("http://example.com/mydoc.xhtml"), () )
css:get(
| $doc as xs:string
) as xs:string
Summary: Fetch the CSS for the given document, be it embedded or linked. Limitation: doesn't account for @import directives in the CSS; assumes the linked CSS is in the database.
Parameters:
$doc : The name of the parent document.
Example:
      xquery version "1.0-ml";
      import module namespace css = "http://marklogic.com/cpf/css"
    		  at "/MarkLogic/conversion/css.xqy";

      css:get("http://example.com/mydoc.xhtml")

© Copyright 2002-2012 MarkLogic Corporation. All rights reserved.