Last active
March 20, 2018 20:30
-
-
Save jessgusclark/c7e396f77c951ce44778a4a1a956b57e to your computer and use it in GitHub Desktop.
PCF / XSL example. First file's extenstion should be .pcf, .html is for code hinting. Change line 2 to correct path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<?pcf-stylesheet path="/jesse/ocn/xiaoman/test1.xsl" extension="html"?> | |
<!DOCTYPE document SYSTEM "http://commons.omniupdate.com/dtd/standard.dtd"> | |
<document xmlns:ouc="http://omniupdate.com/XSL/Variables"> | |
<ouc:properties label="config"> | |
<parameter name="pagetype" type="select" group="Everyone" prompt="Page Type" alt="Please choose appropriate page type."> | |
<option value="article" selected="false">Article</option> | |
<option value="content" selected="false">Content</option> | |
<option value="onecolumn" selected="true">One Column</option> | |
</parameter> | |
<parameter name="quotes" type="select" group="Everyone" prompt="Student Quotes" alt="Do you want to display the student quotes?"> | |
<option value="true" selected="true">Yes</option> | |
<option value="false" selected="false">No</option> | |
</parameter> | |
</ouc:properties> | |
<ouc:properties label="metadata"> | |
<title> | |
</title> | |
<meta name="Description" content="This is the meta description for creating a new page." /> | |
<meta name="Author" content="ME" /> | |
</ouc:properties> | |
<content> | |
<ouc:div label="maincontent" group="Everyone" button="700"> | |
<h1>Hello World</h1> | |
</ouc:div> | |
</content> | |
</document> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE xsl:stylesheet SYSTEM "http://commons.omniupdate.com/dtd/standard.dtd"> | |
<xsl:stylesheet version="3.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns:ou="http://omniupdate.com/XSL/Variables" | |
xmlns:fn="http://omniupdate.com/XSL/Functions" | |
xmlns:ouc="http://omniupdate.com/XSL/Variables" | |
exclude-result-prefixes="ou xsl xs fn ouc"> | |
<xsl:output method="html" | |
version="5.0" | |
indent="yes" | |
encoding="UTF-8" | |
omit-xml-declaration="yes" /> | |
<!-- START DOCUMENT --> | |
<xsl:template match="/document"> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title><xsl:value-of select="title" /> Title</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<xsl:copy-of select="metadata/meta" /> | |
</head> | |
<body> | |
<xsl:apply-templates select="content/ouc:div[@label='maincontent']" /> | |
</body> | |
</html> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment