Hi

I'm trying out JSTL and the XML tags, but got some problems.

This is my code

<%@ taglib uri="HYPERLINK
"http://jakarta.apache.org/taglibs/c"http://jakarta.apache.org/taglibs/c
" prefix="c" %>
<%@ taglib uri="HYPERLINK
"http://jakarta.apache.org/taglibs/x"http://jakarta.apache.org/taglibs/x
" prefix="x" %>

<c:import var="xml" url="XMLDOCUMENT.XML" />
<x:parse xml="${xml}" var="orders"/>

<x:forEach var="order" select="$orders/OrderList/Order">
  <x:out select="$order/PaymentFee"/><br>
  <x:out select="$order/Date"/><br>
  <br>
</x:forEach>

The XML document has a schema

<OrderList xsi:schemaLocation="HYPERLINK
"http://schemas.server.com/Order"http://schemas.server.com/Order
HYPERLINK
"http://schemas.server.com/SS_20011031_Order.xsd"http://schemas.server.c
om/SS_20011031_Order.xsd" xmlns:xsi="HYPERLINK
"http://www.w3.org/2001/XMLSchema-instance"http://www.w3.org/2001/XMLSch
ema-instance" xmlns="HYPERLINK
"http://schemas.server.com/Order"http://schemas.server.com/Order";
TotalNoRows="206">

When I download the xml file and remove the schema, the JSTL code works.
But as soon as the schema is there, I get NO output. No error, no
nothing...

Isn't the schema only to validate the xml? I thought that if the parser
didn't found a error, then I could use the same functions etc? Does the
schema specify how to get the objects out of the xml file as well?
sounds wierd... OR, does the parser not throw an exception and the XML
file is corrupt?

Is there a way to ignore the schema in JSTL?

//Jan





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.507 / Virus Database: 304 - Release Date: 2003-08-04


===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to