Q14. Write the procedure to link a style-sheet with an XML document.
Ans. To link a CSS style-sheet with an XML document, we need to use the PI statement in the XML document.
We need to perform the following steps to link a style-sheet with an XML document:
- Create an XML document and save it as a file with the .xml extension.
- Create a style-sheet and save it as a file with the .css extension.
- Link both the files in the XML document by using the PI, as shown in the following code snippet:
<?xml-stylesheethref=”Name of style-sheet file” type=”text/css”?>