use of xslt formats in creation, maintenance and optimization of web site templates jay mercer iu...
TRANSCRIPT
![Page 1: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/1.jpg)
Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site
Templates
Jay MercerIU CommunicationsIndiana [email protected]
![Page 2: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/2.jpg)
Template Formats?
What are template formats?
Where do I find them?
When should I use them?
How do I use them?
Caveats
Show me some examples!
![Page 3: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/3.jpg)
Similarity to standard block templates• They transform XML compliant source into HTML.
What are template formats?
![Page 4: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/4.jpg)
Similarity to standard block templates• Use a picker to attach to Format field.
What are template formats?
![Page 5: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/5.jpg)
Difference from standard block templates• They transform XHTML compliant source into HTML.• They must be XSLT Formats. (I think)
What are template formats?
![Page 6: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/6.jpg)
Difference from standard block templates• Use a picker to attach to XSLT Format field of a template.
What are template formats?
![Page 7: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/7.jpg)
Template formats are XSLT Formats that are applied to a template.• They transform the entire assembled template content.• Region blocks are rendered first. • Are used to manipulate XHTML.• They transform XHTML into XHTML• “Post-processing.”
What are template formats?
![Page 8: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/8.jpg)
Formats can be applied in 3 places.• Blocks• Templates• Page Configurations
Where do I find them?
![Page 9: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/9.jpg)
Block formats
Where do I find them?
![Page 10: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/10.jpg)
Template formats
Where do I find them?
![Page 11: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/11.jpg)
Page Configuration formats
Where do I find them?
![Page 12: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/12.jpg)
Always. Modify page elements that exist outside the main content area
from within the DEFAULT system region format. Move page elements from one position to another. Modularize code for reusability. Implement “on-demand” javascript. Give end-user greater control. Generate multiple page elements from single block. Quickly create a new website from existing website.
When should I use them?
![Page 13: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/13.jpg)
It all starts with the identity transform.
How do I use them?
![Page 14: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/14.jpg)
Attach identity transform to template XSLT format field.
How do I use them?
![Page 15: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/15.jpg)
Now, just transform the XHTML.• For fun, let’s turn all h3 tags into h4 tags.
How do I use them?
![Page 16: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/16.jpg)
Note: You can use a template format and a page configuration format together.
How do I use them?
![Page 17: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/17.jpg)
Note: You can use a template format and a page configuration format together.
How do I use them?
![Page 18: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/18.jpg)
Another bogus example.• Let’s axe the body.
How do I use them?
![Page 19: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/19.jpg)
DOCTYPE• A template format WILL remove the DOCTYPE from the output.
Namespacing• If namespace on the html element is used, special xpath syntax is needed.
Caveats
![Page 20: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/20.jpg)
DOCTYPE “DON’T”• A template format will strip out the DOCTYPE.
Caveats
![Page 21: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/21.jpg)
DOCTYPE “DO”• Use the “START-ROOT-CODE” passthrough code section tag.
Caveats
![Page 22: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/22.jpg)
Namespacing on html element• If a namespace in used on the html element, special xsl syntax is required.
Caveats
![Page 23: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/23.jpg)
Namespacing on html element• If a namespace in used on the html element, special xsl syntax is required.
Method 1: Use node()[name()=‘body’] syntax
Caveats
![Page 24: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/24.jpg)
Namespacing on html element• If a namespace in used on the html element, special xsl syntax is required.
Method 2: Add namespacing attributes to stylesheet.
Caveats
![Page 25: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/25.jpg)
Changing body id based on data definition.
Example
![Page 26: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/26.jpg)
Changing body id based on data definition.
Example
![Page 27: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/27.jpg)
Here’s the xml from the DEFAULT system region.
Example
![Page 28: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/28.jpg)
Here’s the format from the DEFAULT system region.
Example
![Page 29: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/29.jpg)
Here’s the rendered HTML.
Example
![Page 30: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/30.jpg)
Here’s the template format.
Examples
![Page 31: Use of XSLT Formats in Creation, Maintenance and Optimization of Web Site Templates Jay Mercer IU Communications Indiana University mercerjd@iu.edu](https://reader035.vdocuments.site/reader035/viewer/2022062518/56649e3f5503460f94b2fa83/html5/thumbnails/31.jpg)
Final HTML.
Examples