# CHAPTER 3 (Cedant web hosting) WEB VOCABULARIES Figure 3-8. Firefox

CHAPTER 3 WEB VOCABULARIES Figure 3-8. Firefox showing a more complicated MathML page Content MathML Content MathML allows you to be very explicit about the order of operations and primary equation representation. Content markup has around 100 elements and 12 attributes. Content MathML documents begin in the same way as Presentation MathML documents. They also contain elements to separate the lines of the equation. However, Content MathML elements don t use the element for mathematical operators. Instead, they use the element and specific operator and function elements. This becomes clearer when you look at the same example written in Content MathML:
$\mathrm{10}+(xy)^{4}$

You can find the document saved as mathml_content.mml with your resources. Let s walk through the example.
Note: If you are looking for high quality webhost to host and run your jsp application check Vision christian web host services

# Apache web server for windows – CHAPTER 3 WEB VOCABULARIES You ll find this

CHAPTER 3 WEB VOCABULARIES You ll find this document saved as mathml_presentation.mml with the code download resources. I also could have saved it with a .xml file extension. Figure 3-6 shows the effect of opening this document in Firefox 1.5. Figure 3-6. A Presentation MathML document displayed in Firefox 1.5 Note Firefox may prompt you to install some additional fonts from http://www.mozilla.org/ projects/mathml/fonts/. Installing these fonts ensures that Firefox can render all mathematical symbols in your MathML document correctly. If you try to view this document in a browser that doesn t support MathML, such as Opera 8.5, you ll see something similar to the image shown in Figure 3-7. Figure 3-7. A Presentation MathML document displayed in Opera 8.51 Notice that the browser doesn t render the markup correctly. It doesn t insert the parentheses or raise the exponent. Essentially, it ignores all of the MathML elements and displays only the text within the XML document. You can find a slightly more advanced example in the file quadratic_equation_ presentation.mml. You need to install the Firefox MathML-enabled fonts in order to see the square root sign rendered correctly, as shown in Figure 3-8.
Note: In case you are looking for affordable webhost to host and run your servlet application check Vision ecommerce web hosting services

# Web design seattle – CHAPTER 3 WEB VOCABULARIES x * y

CHAPTER 3 WEB VOCABULARIES x * y 4

In the preceding document, you start with an XML declaration, adding the DOCTYPE declaration for MathML and including the
$document element. The document includes a default namespace for the MathML vocabulary:$
$Next, the document includes anelement, which represents the horizontal row of the equation. The row begins with the number 10and includes a mathematical additional operator +:10+It then includes an{element before the closing}^{}element indicates that the contents are raised to the power of 4. The{\left(element, which corresponds to the use of brackets in a mathematical equation. Within the brackets, the equation multiplies x by y:{\left(x*y\right)}^{4}\right)}^{}$
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision shared web hosting services

# CHAPTER 3 WEB VOCABULARIES The DOCTYPE declaration (Web server setup)

CHAPTER 3 WEB VOCABULARIES The DOCTYPE declaration for XHTML Basic is I ve introduced you to the basics of XHTML, examining it as a vocabulary of XML. Now let s move on to examine some of the other popular web vocabularies, starting with MathML and SVG. MathML Mathematical Markup Language (MathML) is a popular XML vocabulary that describes mathematical notation. It was developed to include mathematical expressions on web pages. MathML is an XML vocabulary, so it must be well formed and valid according to the specification. You can find out more about MathML at http://www.w3.org/Math/. While the W3C MathML group was developing the specification, the group realized it actually had two distinct goals. There was a need for a vocabulary that could represent both how mathematic equations were displayed, as well as the meaning of a mathematic equation. The group divided MathML into two types of encoding: presentation and content. Presentation MathML conveys the notation and structure of mathematical formulas, while Content MathML communicates meaning without being concerned about notation. You can use either or both of these elements, depending on your task, but be aware that each has some web browser limitations. Firefox supports Presentation MathML, as MathML is part of Mozilla s layout engine. The derived browsers Netscape, Galeon, and Kmeleon also include Presentation MathML, as does the W3C browser Amaya. Internet Explorer 6 supports MathML using plugins such as the free MathPlayer (http://www.dessci.com/en/products/mathplayer/) and techexplorer (http://www.integretechpub.com/techexplorer/). You can t use MathML within Opera. Presentation MathML Presentation MathML provides control over the display of mathematic notation in a web page. Thirty presentation elements and around 50 attributes allow you to encode mathematical formulas. Presentation MathML tries to map each presentation element to an element. To start, Presentation MathML divides a formula into vertical rows using elements. This basic element is used as a wrapper. Rows may contain other nested rows. Each element usually has a combination of mathematical numbers (), mathematical identifiers (), and mathematical operators (). This example represents 10 + (x . y)4:
$10+{}^{}$
Note: In case you are looking for affordable webhost to host and run your web application check Vision cheap hosting services

# CHAPTER 3 WEB VOCABULARIES Embedding Advertising Information (Web server info)

Note: If you are looking for high quality webhost to host and run your jsp application check Vision florida web design services

# Web design portfolio – CHAPTER 3 WEB VOCABULARIES Including JavaScript

CHAPTER 3 WEB VOCABULARIES Including JavaScript in your page Embedding advertising information Including unsupported elements and attributes In this section, I ll show you some practical tips to address these issues. Many of these tips may be helpful when working with other web vocabularies. Including JavaScript in Your Page For validity, it s best to store your JavaScript in a separate file and refer to it with the rewrite it like this:
Note: If you are looking for high quality webhost to host and run your jsp application check Vision florida web design services

CHAPTER 3 WEB VOCABULARIES

Your spacecraft is the Mars Explorer, which provides the latest in passenger luxury and travel speed.

XHTML 1.0 Transitional Document

I ve saved this document as marstransitionalerror.htm if you want to try validating it yourself. Figure 3-5 shows the effect of validating this document. Figure 3-5. Validation errors Validating a web site is an important step. The next section looks at some common practices that can cause validation errors. Validation Errors Unfortunately, the everyday practices of web professionals can cause validation errors. Some common issues involve
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision tomcat hosting services

# CHAPTER 3 WEB VOCABULARIES Figure 3-4. The (Web site layout)

CHAPTER 3 WEB VOCABULARIES Figure 3-4. The validation results In addition to errors, the W3C validator may return warnings. Often, these warnings refer to possible character encoding or DOCTYPE problems. The warnings normally offer suggestions that allow you to address the issues. If you re able to validate your entire site, you can display the W3C XHTML logo on your web page. If your validation produces an error message, fix the error and validate the document again. Where you re notified of multiple errors, it s usually easier to revalidate after fixing each error, because a single error can often cause multiple errors later in the document. I ll deliberately introduce errors into the marstransitional.htm page so you can see the effect on validation. I ve left out the closing

tag and introduced an element. The document now reads like this: Some text

# CHAPTER 3 WEB VOCABULARIES Validity (Free web hosting music) is an

CHAPTER 3 WEB VOCABULARIES Validity is an important concept for web developers because creating valid documents guarantees that your web site is interoperable with virtually any XML application. A number of online tools can check XHTML documents for validity. Online Validators In addition to the tools I mentioned previously, several web sites offer free online validation services. You can use them to check that your document is valid against specific versions of the XHTML specification. Two popular online validators include W3C Markup Validation Service: http://validator.w3.org/ WDG HTML Validator: http://www.htmlhelp.com/tools/validator/ I ll validate one of the XHTML documents that you saw previously to show you how the W3C Markup Validation Service works. You need to use the Validate by File Uploadoption to validate an offline file. Open the web site (http://validator.w3.org/) and click the Browse button to select your file. In Figure 3-3, I m validating the file marsstrict.htm. Figure 3-3. Uploading a file for validation at the W3C Markup Validation Service Click the Check button to validate the document. After validating, you can see whether the document is valid. You also might see some other messages about the page, as shown in Figure 3-4.
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision j2ee hosting services

# CHAPTER 3 (Web design company) WEB VOCABULARIES XHTML Editors Editors

CHAPTER 3 WEB VOCABULARIES XHTML Editors Editors written specifically for XHTML documents can provide the most features. These tools often come with XHTML document templates and can warn you about potential display problems. Most importantly, many XHTML editors allow you to design XHTML visually without needing to see the markup. This can be very useful when designing complex layouts. Some common XHTML editors include Adobe s (formerly Macromedia) Dreamweaver: http://www.macromedia.com/software/dreamweaver/ Microsoft s FrontPage: http://www.microsoft.com/frontpage/ W3C s Amaya: http://www.w3.org/Amaya/ Chami.com s HTML-Kit: http://www.chami.com/html-kit/ Adobe s (formerly Macromedia) HomeSite: http://www.macromedia.com/software/ homesite/ Belus Technology s XStandard: http://xstandard.com/?program=google1 Bare Bones Software s BBEdit: http://www.barebones.com/products/bbedit/ index.shtml NewsGator Technologies TopStyle: http://www.bradsoft.com/topstyle/ Again, you can often download a trial version so you can test the software against your needs. Well-Formed and Valid XHTML Documents Even if you follow the XHTML construction rules, you need to make sure that the document is both well formed and valid. These concepts are critical regardless of which XML vocabulary you use. In Chapter 1, you learned that an XML document must be well formed before it can be processed by an XML parser. Well-formed means that The document contains one or more elements. The document contains a single document element, which may contain other elements. Each element closes correctly. Elements are case-sensitive. Attribute values are enclosed in quotation marks and cannot be empty. A document is valid if, in addition to being well formed, it uses the correct elements and attributes for the specified vocabulary. In XHTML, the DOCTYPE declaration determines which DTD is used and hence, the validity of elements and attributes.
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision best web hosting services