473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Xerces parser and XSL

Hi All

I am using Xerces parser to convert my xml to the output given below
and for this i am using the xslt. How shall i create href attribute in
xerces parser?

When i am using MSDOM parser the output is whats requied. But if Xerces
parser is used then no attribute withe name href is created.

Can any one suggest what need to to be done.

output with DOM parser
<a href ="www.google.com">www.google.com</a>

output with Xerces parser
<a>www.google.com</a>

template in xsl is :
<a>
<xsl:attribute name="href">
<xsl:value-of select="@link"/>
</xsl:attribute>
<xsl:value-of select=./>
</a>

Nov 23 '05 #1
4 1688


M Arora wrote:
I am using Xerces parser to convert my xml to the output given below
and for this i am using the xslt. How shall i create href attribute in
xerces parser?


XSLT is not in any way done by the Xerces parser, thus if some XSLT
stylesheet is not giving you the output you want you should look into
the XSLT processor used.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 23 '05 #2
But I am getting the correct ouput with DOM Parser but not with java
Xerces parser. Can you suggest me whats the difference

Nov 23 '05 #3


M Arora wrote:
But I am getting the correct ouput with DOM Parser but not with java
Xerces parser. Can you suggest me whats the difference


DOM Parser? In Java? Xerces is one implementation of that if DOM Parser
refers to
<http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/DocumentBuilder.html>
But you are talking about problems with the output of an XSLT stylesheet
and Xerces is a parser and not an XSLT processor so you need to find out
which XSLT processor you use to get that output.
If you are using the standard Java 1.4/1.5 APIs to perform an XSLT
transformation then you would use javax.xml.transform.TransformerFactory
to create an implementation of javax.xml.transform.Transformer. Which
implementation is actually used when you run a Java program depends on
certain properties respectively the class path.
See
<http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/transform/TransformerFactory.html#newInstance()>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 23 '05 #4
Hi

Thanks for making an effort to find the solution with me. I tried
creating the HTMl tags for the output and it worked. It was not a
problem of Xerces parser.

Thanks once again

Nov 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: bugbear | last post by:
Subject pretty much says it all. I'd like to parse XML (duh!) using Xerces (because its fast, and reliable, and comprehensive, and supports lots of features). I'd like to conform to standards...
0
by: BODIN | last post by:
I have an XML document, which is actually physically stored in 2 separated files. doc1.xml and doc2.xml I NEED a WAY FOR THIS SIMPLE NEED : XML file splitted into two physical files, and use...
1
by: Hans Bijvoet | last post by:
Hello, I'm trying to parse a HTML document with the SAX parser from Xerces. The parser throws a fatal error when attribute values in the document are not surrounded by quotes? How can I prevent...
2
by: Cigdem | last post by:
Hello, I am trying to parse the XML files that the user selects(XML files are on anoher OS400 system called "wkdis3"). But i am permenantly getting that error: Directory0: \\wkdis3\ROOT\home...
3
by: Matt | last post by:
Hello, Summary: Where can one download a Xerces-C (XML pardser) dynamic library file (.DLL file) for Windows (Win98/WinNT/Win2k/WinXP/Win2003, including server flavors; don't need to support...
7
by: christian.eickhoff | last post by:
Hi Everyone, I am currently implementing an XercesDOMParser to parse an XML file and to validate this file against its XSD Schema file which are both located on my local HD drive. For this...
1
by: Nuno | last post by:
Hello, I'm looking for a way of validating/parsing the xsd file (schema), i only been able of validating the xml file with the corresponding schema, but what i want is only validate the xsd...
9
by: mstilli | last post by:
Hi, I am trying to use schema for server side validation using xerces to catch the validation errors. validating this XML: <Content4> <textarea13></textarea13>...
1
by: Blocksom | last post by:
I am new to Java and XML and I am trying to solve a problem that has bothered for few days. I have download the parser Xerser-1.4.3 and jdk1.5.0_06I install the JDK first and test it, it...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.