Jump to content

Search the Community

Showing results for tags 'dtd'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH


  • Community Calendar




Website URL








Found 6 results

  1. DTD/XML to HTML

    As I went through the XML tutorials I kept thinking about a personal project I want to do at home. I would like to turn my iTunes library into a webpage. I just need a view only page, but something that could be automatically updated when items are added to the library. You may already know iTunes uses an xml file to store metadata about media files in the library. This xml has a dtd schema (<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">) identifying the structure of the xml (I learned this from the tutorials). I want to use the "iTunes Library.xml" to populate the web page, and since it already has a structure, I figured it would be easy to do. The problem is I don't see how to do this. Going through all the XML tutorials including the DTD tutorial, it's not clear on how to accomplish this. I tried to reference the xml tags through the DOM, it worked once, giving me the tag type. I also found that using the DOM on such a large XML could make the web page slow. I know that I could use an xslt to format the xml but I would have to reference the xslt document in the xml. Again I want it dynamic, so using the referenced iTunes dtd works. I just can't determine how to go about doing this with the tutorials. They didn't make it clear how to use the DTD to turn the xml into html Any assistance would be greatly appreciated.
  2. <!DOCTYPE> and DTD question

    Hello! I'm a beginner when it comes to XHTML/HTML and therefore I have a question. As far as I know you are supposed to tell the browser what (X)HTML version the document uses in the <!DOCTYPE>-tag and then the browser will "understand" and read the document correctly. But you also provide a link to a DTD that says exactly what elements are allowed etc. My question: Does the browser read the DTD in order to display the document or can it display the document properly by just knowing the actual (X)HTML version stated in <!DOCTYPE>? If the browser doesn't read the DTD, then why is it necessary to include a link to it in the <!DOCTYPE>-tag? Thanks!
  3. I have a some System Entities defined our my Master xml (that has entity references to contained xml's) that I use to get image locations using (unparsed-entity-ur). Which works fine, except for the case where the xml has a figure object with comments:note attribute, and then a contained <graphic> which uses entity reference to resolve the image source. Without the comment:note of the figure, it resolves fine. The problem is my comment xslt template creates a document fragment of the node containing the comment without the comment attribute resulting from xsl copy-of function, so it is now not connected to the main document anymore, so when it is done transforming the content, when trying to resolve 'unparsed-entity-uri' returns blank. So, my question is, is there anyway to still reference the entity, or pass the value/reset the value/set value to another parameter/etc around this new document fragment so that I can still get the source value of the image? The xsl calls are below that creates the new document fragment. For the graphic tag, which occurs after the comment, have another template where I call the 'unparsed-entity-uri' of a name passed in from the xml, but just returns blank. <xsl:template>.... <xsl:variable name='decommented-node'> <xsl:call-template name='decomment'> <xsl:with-param name="node" select='.' /> </xsl:call-template> </xsl:variable> <!-- Apply the template for the decommented node. Need to drill down into the document fragment that contains that node. And, for good measure, pick the first child. --> <xsl:apply-templates select='$decommented-node/*[1]'/> </xsl:when> <xsl:otherwise> <!-- We haven't yet shown title. Process all nodes. --> <xsl:apply-templates/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <!-- Do NOT render --> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name='decomment'> <xsl:param name='node' select='.'/> <xsl:element name='{name($node)}'> <xsl:for-each select="$node/*[name()!=title]|text()|$node/@*[name()!=comment]"> <xsl:copy-of select="."/> </xsl:for-each> </xsl:element> </xsl:template>
  4. dtd problem

    Hi all, I have the follow problem, I have an xml file that have this, this xml file can't be changed: <root> <title>Hello</title> <content> <title>Weekend</title> </content></root> I must have a DTD that must validate the xml, now the problem is that I have two nodes with the same name title, this is my proposal, but it doesn't pass the validation, because I can't declare the same name more than once: <!ELEMENT root (title, content)><!ELEMENT title (#PCDATA)><!ELEMENT content (title)><!ELEMENT title (#PCDATA)> This is a school project, and I am obligated to use a dtd to validate an xml. Thanks all!
  5. Brief question on creating DTDs

    Hi everyone, When creating a DTD, is there special syntax for when a child and grandchild element share the same name? i.e.: <!DOCTYPE Parent [<!ELEMENT name(#PCDATA)><!ELEMENT child(name,age)><!ELEMENT name(#PCDATA)><!ELEMENT age(#PCDATA>]> XMLuser
  6. According to the "HTML Elements and Valid Doctypes" page at "http://www.w3schools...ef_html_dtd.asp", the tags like 'thead', 'tbody', 'col', 'del', 'ins' are invalid for XHTML 1.1. But when I checked with the official DTD at "http://www.w3.org/TR...DTD/xhtml11.dtd", they all look properly included and valid elements for the xhtml1.1. I know that there are two versions of table modules supported by XHTML1.1 specification: one with 'thead', 'tbody', 'col' and another one without them(whick is called "Basic Table Module" if anyone cares). But I think the official DTD uses the one with those tags, not the one without them. The edit module which includes 'del' and 'ins' elements seems to be include at the official DTD as well. (I think there are several more tags with the mis-matching validity like above, but I am too lazy to list them all) It's very confusing