Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to define DTD in xsl?

843834Sep 17 2009 — edited Sep 18 2009
--------------------------------------------
XSL
--------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0"
    xmlns:xalan="http://xml.apache.org/xslt">
        <xsl:output method="xml" indent="yes"/>
         <xsl:template match="/">
    
<!-- Begin Embedded DTD -->
<!DOCTYPE book [
<!ELEMENT catalog (title,name)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT book (cataglog+)>
]>
<!-- End Embedded DTD -->

<book>
	<catalog>
		<title>
		<xsl:value-of select="/book/catalog/title/@value"/>			
		</title>
		<name>
		<xsl:value-of select="/book/catalog/name/@value"/>
		</name>
	</catalog>

</book>
</xsl:template>
</xsl:stylesheet>
xls does like this:
<!-- Begin Embedded DTD -->
<!DOCTYPE book [
<!ELEMENT catalog (title,name)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT book (cataglog+)>
]>
<!-- End Embedded DTD -->
Any xsl tag which accepts dtd declaration?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 16 2009
Added on Sep 17 2009
1 comment
102 views