The Open Source Swiss Army Knife

/xml/
/xml/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /xml 
sub-categories and articles

                                                  
dirjava_xml add
dirxml_c expat samples
dirxml_samples xml docuemnts and their xsl stylesheets samples directory
   --->create new sub-category


choose.htm
add

<xsl:choose>

  • xsl:choose is necessary when you need an "otherwise"

f4each.htm
add

this documnet is a working example of an xml to html transformed with an xsl stylesheet. the ie5.0+ did the transformation.

the xml file:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="foreach.xsl"?>
<catalog>
   <cd>
      <title>empire burlesque</title>
      <artist>bob dylan</artist>
      <country>usa</country>
      <company>columbia</company>
      <price>10.90</price>
      <year>1985</year>
   </cd>
</catalog>

fat.htm
add

<xsl:apply-templates>

xsl:apply-templates directs the processor to find the appropriate template to apply

<xsl:apply-templates  select = expression  mode = QName>

fchuz.htm
add

to insert a conditional choose test against the content of the file, simply add the xsl:choose, xsl:when and xsl:otherwise elements to your xsl document like this:

<xsl:choose>
   <xsl:when test=".[artist='bob dylan']">
      ... some code ...


ffiltr.htm
filtering with select

To filter the XML file, simply add a filter to the select attribute in your for-each element in your XSL file like this:

<xsl:for-each select="CATALOG/CD[ARTIST='Bob Dylan']">

Legal filter operators are:


fif.htm
add

to put a conditional if test against the content of the file, simply add an xsl:if element to your xsl document like this:

<xsl:if match=".[artist='bob dylan']">
... some output ...
</xsl:if>


flink.htm
add

try here

for_each.htm
add

<xsl:for-each>

<xsl:for-each> is a construct that processes an entire node set inside a single rule. <xsl:for-each> sets up a new context node set and context node internally that are useful for localized effects such as building formatted lists and calling special functions. For example, The rule uses <xsl:for-each> to create a numbered list of chapter titles before processing each chapter with the <xsl:apply-templates> directive. Thus, the following generates a table of contents:

<xsl:template match="book">
     <xsl:for-each select="chapter">
       <xsl:value-of select="position()"/>
       <xsl:value-of select="title"/>
     </xsl:for-each>
     <xsl:apply-templates/>
</xsl:template>

fsort.htm
add

try here

onclient.htm
using javascript to transform xml into html by the browser

try here

onservr.htm
using ASP to transform the xml and xsl

try here

parsers.htm
overview and comparison of a few xml parsers

xml parsers: xml programming with xml
vendors
  1. IBM and Apache Software Foundation
    • XMLJ4
    • XML4C
  2. Microsoft
    • Internet Explorer
    • MSXML 3.0
    • XML tools
  3. Oracle
languages
    1. php
    2. expat a parser by james clark (the C language)
    3. java
    4. perl parsers
    5. in c++ there .................................. IMPORTANT!!
    6. xerxes is another java parser which supports both parsing models (there are two, I believe)

prdlst.htm
add

XSLT-Servlet Demo: Alpahbetical List of Products

XSLServlet Demo: Alpahbetical List of Products


sorting.htm
add

try here

transf.htm
add

Before transformation

    <repairs>
    <repair>...
    

value.htm
add

Examples

This example creates an paragraph around a car element with a color child element. The paragraph will contain the value of the color child element in the output:
<xsl:template match="car">
  <p>
    <xsl:value-of select="color"/>
  </p>
</xsl:template>

xml_definitions.htm
assigning order to chaos

xml and xsl terms and definitions

  1. general procedure
  2. parsers
  3. xml definitions
  4. xsl definitions
  5. dtd definitions
  6. xpath

xsl_transforms.htm
add

  1. link to www3 where it's all at
  2. search google for james clark's xt parser, which is an xsl_transform spec for xsl. Also, that xt package is now in my search engine, too (Dec 21 2003).
  3. there is an apache module which will do xslt style transforms. It is called mod_xslt.
   --->upload your article


User submitted category site links


strings file December
1. API User's Guide
Return to Java API Java API User's Guide How to Locate API To Locate a Package: Go to the Package Index To Locate a Class or Interface: Go to the...
URL: http://www.jclark.com/xml/xp/api/API_users_guide.html - 4KB - 26 Jan 1998
2. Empire Burlesque
Bob Dylan USA Columbia 10.90 1985 Hide your heart Bonnie Tyler UK CBS Records 9.90 1988 Greatest Hits Dolly Parton USA RCA 9.90 1982 Still got the...
URL: http://www.w3schools.com/xsl/cdcatalog.xml - 5KB - 23 Nov 2006
3. XML.com: Using Expat
Clark Cooper o
URL: http://www.xml.com/pub/a/1999/09/expat/index.html?page=3 - 45KB - 12 Feb 2007

-->submit a page from your site dealing with xml to the sirfsup! web directory for listing

return to top