[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: parsed entites
At 99/11/17 13:20 -0800, Alexandra Morgan wrote:
As I understand it, entities have to be declared inside the DOCTYPE. But my stylesheets don't have a DTD. Can I have a DOCTYPE without having a DTD? It isn't a problem to have a DOCTYPE without a DTD. When I work with the text output method, I usually create a &nl; entity to emit line feeds in my output as follows: <?xml version="1.0"?> <!DOCTYPE xsl:stylesheet [ <!ENTITY nl "
"> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:template match="/"> <xsl:text>&nl;</xsl:text> </xsl:template> </xsl:stylesheet> You can also have partial DTDs ... a common XSLT processing requirement for well-formed documents is to recognize which attribute of elements is of type ID (because there is nothing special conferred on attributes that are *named* ID). To communicate this information regarding the source file to the stylesheet, the following can be added to the source: <!DOCTYPE custsummary [ <!ATTLIST cust custNbr ID #REQUIRED> ]> <custsummary> ...... I hope this helps. ............ Ken
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|