473,657 Members | 2,862 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.co m">www.google.c om</a>

output with Xerces parser
<a>www.google.c om</a>

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

Nov 23 '05 #1
4 1707


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.trans form.Transforme rFactory
to create an implementation of javax.xml.trans form.Transforme r. 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/TransformerFact ory.html#newIns tance()>

--

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
4258
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 as much as possible, so I'd like to call Xerces under the JAXP API. I'd like to validate the XML against a DTD, so that errors are flagged up to the user, and I can transcribe
0
1772
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 of XML Schema.
1
3818
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 this parser's behaviour? Greetings, Hans
2
3946
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 Canonicalpath-Directory4: \\wkdis3\ROOT\home\bwe\ You selected the file named AAA.XML getXmlAlgorithmDocument(): IOException Not logged in
3
3396
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 pre-98) without having to build the library from source? We posed this question to the Xerces-users email list, but have yet to
7
10281
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 purpose I set the corresponding XercesDOMParser feature as shown in the upcoming subsection of my code. As far as I understand, the parsing process should throw an DOMException in case the XML file doesn't match the Schema file (e.g. Element...
1
4739
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 file, to check if the schema is valid. I'm using Xerces-C++ and the only thing that i found is a way of parsing the xml file with the xml schema like this:
9
3008
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> <binaryobject3></binaryobject3>
1
2013
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 works.By the way,the location of JDK is:C:\Program Files\Java\jdk1.5.0_06; Then I install the parser to the follow location:C:\Program Files\Java\xerces-1_4_3, using this command right under the C drive. jar xf xerces-j-bin.1.4.3.zip This creates a...
0
8303
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8821
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8723
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8502
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7316
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.