473,625 Members | 3,111 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Xml, xsd, xslt and default values in xercesc

Hi All,

I have small problem. We are using xslt to display xml in web browser. But
our (any?) xslt does not support default values stored in xsd ... it leaves
empty holes in table. Therefore I need to write them to xml explicitly. I
would like to load them from xsd. Is it possible in xerces ? I create empty
DOM document and store it to file. Is it possible to bind schema to document
and retrieve default values for attributes before storing to disk ?

Best Regards

Jacek

Mar 14 '06 #1
4 1600
Jacek wrote:
our (any?) xslt does not support default values stored in xsd ... it leaves
empty holes in table.


Make sure the parser being used by your XSLT processor is running in
validating mode. If it is, it should be taking care of default values
before XSLT sees the document.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Mar 14 '06 #2
> Make sure the parser being used by your XSLT processor is running in
validating mode. If it is, it should be taking care of default values
before XSLT sees the document.


Unfortunately we are using web browser ... for example IE :). I don't think
it is possible to force it to read default values from schemas.

Regards
Jacek
Mar 15 '06 #3
Jacek wrote:
Unfortunately we are using web browser ... for example IE :). I don't think
it is possible to force it to read default values from schemas.


In that case, like a young codfish, you're scrod. If the parser doesn't
read the schema or DTD, you don't have the defaults. Preprocess on the
server end to copy the defaults in as explicit values, so you aren't
dependent on them.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Mar 16 '06 #4
> In that case, like a young codfish, you're scrod. If the parser doesn't
read the schema or DTD, you don't have the defaults. Preprocess on the
server end to copy the defaults in as explicit values, so you aren't
dependent on them.


Thanks for repeating conclusion from my first post. I was hoping that
someone knows how to do this.
Regards
Jacek
Mar 18 '06 #5

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

Similar topics

1
1865
by: øystein | last post by:
Hi! I got an xml file that goes like this. <question id=10 correct_answer=2> <alternative>Answer 1</alternative> <alternative>Answer 2</alternative> <alternative>Answer 3</alternative> <alternative>Answer 4</alternative> </question>
9
2891
by: Iain | last post by:
I want to create an XML configuration file which might look like <REGION Name="Europe" WingDing="Blue"> <COUNTRY Name="UK" WingDing="white"> <TOWN Name="London" WingDing="Orange" /> </COUNTRY> </REGION> <REGION Name="NorthAmerica" WingDing="Yellow"> <COUNTRY Name="Canada"> <TOWN Name="Quebec" WingDing="Brown" />
2
2380
by: Jon Martin Solaas | last post by:
For java programmers there exist a framework called Millstone (www.millstone.org) for programming web user-interfaces in a component oriented way. Millstone uses xslt transformations to render components as html. I'm trying to modify millstone so that it can display a html editor widget called HTMLArea instead of the usual html <textarea> tag. But I need a little help with the xslt transformation. Especially there is a construct,...
6
10612
by: M.Kamermans | last post by:
I have an XSLT script that has to operate on some particularly nasty XML to turn it into a SQL databse, but 'entries' in the XML aren't actually unique, so their unique identifier is useless. I need to somehow create crosslinked tables using the XSLT, but can only do this by maintaining a counter for each line I write. Is there a way to create a proxy 'increment' function that lets me maintain a counter variable? - Mike Kamermans
1
3887
by: Lars Both | last post by:
Hi everybody, i want to do the following. I have data in a XML-File. Additionaly I have a XML Schema which defines valid values for every field and alternative options. Now I want to create a Stylesheet (for xalan for example) that creates HTML respecting the actual valus in the XML file and the default data in the Schema. An example. The field 'color' has the alternatives red,green and blue
4
2164
by: Moogy | last post by:
I'm pulling my hair out here. First, I'm new to XML, so that doesn't help, but none of this makes any sense to me. All I'm trying to do is take a simple source XML file and translate it with an XSLT to produce HTML code. The problem I have is that no matter what translation it runs through, it ALWAYS includes data that I don't match in the XSLT!! All I want to do is extract specific fields from the XML. Here's the XML source....
4
8954
by: David S. Alexander | last post by:
How can I do simple subtraction in an XSLT. I want to read a few attribute values from an XML document, calculate their difference, and transform that value to an attribute in the XML output document. My original XML is, <Dates> <Birth Year="1966" />
2
22765
jkmyoung
by: jkmyoung | last post by:
Here's a short list of useful xslt general tricks that aren't taught at w3schools. Attribute Value Template Official W3C explanation and example This is when you want to put dynamic values in the attribute of an element. Instead of using the <xsl:attribute> element, you can simply place the xpath in the attribute itself. The most common usage of this is in creating hyperlinks.
0
8253
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8692
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
8635
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...
0
7182
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...
1
6116
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
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
4192
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
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
1
1802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.