---
title: "XMLTRANSFORM"
description: "The XMLTRANSFORM SQL functions applies an XSL style sheet to the XML instance."
language: cs
source_language: en
translation_state: pending
canonical: https://documentation.invantive.eu/cs/docs/invantive-universalsql/grammar/sql-functions/xmltransform
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/xmltransform
updated: 2026-12-04T14:12:38Z
license: https://documentation.invantive.eu/cs/
---

## Syntaxe
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> XMLTRANSFORM[XMLTRANSFORM]:::quoted
    XMLTRANSFORM --> End((END))
```

## Účel
The `XMLTRANSFORM` SQL functions applies an XSL style sheet to the XML instance.

See also [[XMLCOMMENT]], [[XMLDECODE]], [[XMLELEMENT]], [[XMLENCODE]] and [[XMLFORMAT]].

Parametry:
- XML (`varchar2`): XML type instance to be transformed with the XSL style sheet.
- Style sheet (`varchar2`): The XSL style sheet to apply.

Returns: the XML instance with the style sheet applied to it.

## Příklady
The following example extracts the value of the element `name` from an XML instance using an XSL style sheet:
```sql
select xmltransform
       ( '<?xml version="1.0"?><name>peter</name>'
       , '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="html" indent="yes"/><xsl:template match="/"><xsl:value-of select="name"/></xsl:template></xsl:stylesheet>'
       )

-------------------
peter
```
The following example extracts the value of the element `first-name` from an XML instance with multiple child elements using an XSL style sheet:
```sql
select xmltransform
       ( '<?xml version="1.0"?><r><name>peter overlap</name><first-name>peter</first-name></r>'
       , '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="html" indent="yes"/><xsl:template match="/r"><xsl:value-of select="first-name"/></xsl:template></xsl:stylesheet>'
       )

-------------------
peter
```

