I want to create a structured document in which the i have a mark up <DATA></DATA> which can contain html tags & any other charecters eg <DATA> User Information <tale> <tr> <td>ID</td> <td>NAME</td> </tr> </table> </DATA> .So how can i specify this element in the DTD [This message has been edited by Anoop Krishnan (edited July 02, 2001).]
I just want to know is there any body call my bean's Getter and Setter methods with "Please" in front - My favorite quip from Bugzilla
You should treat even the HTML tags like any other "normal" XML tags. They are no exceptions.
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Anoop Krishnan
Ranch Hand
Joined: May 03, 2001
Posts: 163
posted
0
Thank you for your reply But i have seen something like this related to xml.What is this actually <![CDATA[<greeting>Hello, world!</greeting>]]>
Ajith Kallambella
Sheriff
Joined: Mar 17, 2000
Posts: 5782
posted
0
Marking the entire section as CDATA instructs the parser not to process the elements enclosed as XML data, but to treat them as raw data. If the text contains any XML tags, they too are treated as plain text. Often times authors use this trick to prevent some parts of the documents from being processed. HTH ------------------ Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform. IBM Certified Developer - XML and Related Technologies, V1.
I hope this is still on topic and relevent to the question at hand: How do I translate an XML tag to HTML where the tag is a valid XML tag that can be queried with XPATH, but the data within the tag may contain special characters that need to be passed through to the HTML so that the HREF functions properly. For example: <url>http://www.brainbench.com/xml/bb/common/testcenter/subcatresults.xml?cat1=9&cat2=31&cat3=22</url>
------------------ IBM Certified Developer - XML and Related Technologies, V1. AcqURL : The next evolution in bookmark management.
IBM Certified Developer - XML and Related Technologies, V1.<BR><A HREF="http://www.acqurl.com" TARGET=_blank rel="nofollow">AcqURL</A> : The next evolution in bookmark management.
Glen, you can construct your HTML output using {XPath expression}, which is shorthand from <xsl:value-of select="XPath expression"> xml: <?xml version="1.0"?> <url>http://www.brainbench.com/xml/bb/common/testcenter/subcatresults.xml?cat1=9&cat2=31&cat3=22 </url> xslt: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body> <a href="{url}">this is a link</a> </body> </html> </xsl:template> </xsl:stylesheet> output: <html> <body> <a href="http://www.brainbench.com/xml/bb/common/testcenter/subcatresults.xml?cat1=9&cat2=31&cat3=22%0A">this is a link</a> </body> </html>
The URL inside the tags contains special "&" characters, so the parser chokes on them. However, I found that if I put the <![CDATA[http://www.brainbench.com/xml/bb/common/testcenter/subcatresults.xml?cat1=9&cat2=31&cat3=22]]> tag inside of the <url> </url> tags everything works fine. The first time I tried this it didn't work, so there must have been a typo in the code I was using to programatically insert the <![CDATA[var]]> in the XML document I was creating. Everything is working fine now.