Jump to content

Search the Community

Showing results for tags 'dtd'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 5 results

  1. sgt_spike

    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. 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. jo_rocks

    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. 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
×
×
  • Create New...