An open API service indexing awesome lists of open source software.

https://github.com/bernardodiasc/xslt

XSLT Components Showcase [tutorial]
https://github.com/bernardodiasc/xslt

Last synced: 23 days ago
JSON representation

XSLT Components Showcase [tutorial]

Awesome Lists containing this project

README

        

# XSLT Demonstration

- Setup: don't need! just open the xml in your browser! :D
- Preview: [http://bernardodiasc.github.io/xslt/](http://bernardodiasc.github.io/xslt/)

> Make sure to check the source code of the preview page - it's **XML**

## Templates

In this demonstration only have the `navigation` component ([/templates/navigation/index.xsl](https://github.com/bernardodiasc/xslt/blob/gh-pages/templates/navigation/index.xsl)). There is 2 templates for the same matched data, one called `simple` and the other `complex`. The `model-name` is used here to represent a data source.

### Navigation mode simple

The mode `simple` copy the matched xml nodes as html. This is ok since XHTML is XML.

- Match: `data/module[@name='navigation']`
- Mode: simple
- Usage:

```xml
`
```

- Sample XML:

```xml


Navigation



```

- XSLT Template:

```xml

```

### Navigation mode complex

The mode `complex` iterate the matched xml nodes and build the markup with an alternative markup structure.

In this case the markup resulted is intentionaly the same of simple mode markup. The structured data is parsed to build the html.

- Match: `data/module[@name='navigation']`
- Mode: complex
- Usage:

```xml

```

- Sample XML:

```xml

Navigation

About us
Team
Projects
Contacts
Partners

```

- XSLT Template:

```xml







  • -




```