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

Home Posts Topics Members FAQ

Multiple Elements

Hi,
I've got another question.
My Code works fine now and I've tried some other functions.
XSLT-Code is now:
<!DOCTYPE BUCH [
<!ELEMENT BUCH (KAPITEL)+>
<!ELEMENT KAPITEL (UEBERSCHRIFT*, ZWISCHENUEBERSC HRIFT*,
TEXT*)>
<!ELEMENT UEBERSCHRIFT (#PCDATA)>
<!ELEMENT ZWISCHENUEBERSC HRIFT (#PCDATA)>
<!ELEMENT TEXT (#PCDATA)>
] >

Like on the Book the MULTIPLE says "Allow Multiple Tags of this".
But IE6 &NE7 &MOZ doesn't show Multiple Lines. They only show ONE
Sub-Tag (the Content) per KAPITEL. They do show multiple KAPITEL.
Does anyone know why?
M.

Jun 1 '08 #1
5 1727


<Mi************ **@t-online.dewrote in message
news:tt******** *************** *********@4ax.c om...
Hi,
I've got another question.
My Code works fine now and I've tried some other functions.
XSLT-Code is now:
<!DOCTYPE BUCH [
<!ELEMENT BUCH (KAPITEL)+>
<!ELEMENT KAPITEL (UEBERSCHRIFT*, ZWISCHENUEBERSC HRIFT*,
TEXT*)>
<!ELEMENT UEBERSCHRIFT (#PCDATA)>
<!ELEMENT ZWISCHENUEBERSC HRIFT (#PCDATA)>
<!ELEMENT TEXT (#PCDATA)>
] >

Like on the Book the MULTIPLE says "Allow Multiple Tags of this".
But IE6 &NE7 &MOZ doesn't show Multiple Lines. They only show ONE
Sub-Tag (the Content) per KAPITEL. They do show multiple KAPITEL.
Does anyone know why?
M.
If the DOCTYPE is for BUCH you can only have one BUCH element otherwise the
XML would not be a well-formed document, it would be a fragment. The +
applies to the KAPITEL elements.

--

Joe Fawcett
http://joe.fawcett.name

Jun 1 '08 #2
Mi************* *@t-online.de wrote:
Hi,
I've got another question.
My Code works fine now and I've tried some other functions.
XSLT-Code is now:
<!DOCTYPE BUCH [
That's the dtd not the XSLT, but I assume the xslt is similar to the
code posted in the earlier thread.

<H3>
<xsl:value-of select="ZWISCHE NUEBERSCHRIFT"/>
</H3>
the select="ZWISCHE NUEBERSCHRIFT" does select all those elements but
value-of (in xslt 1) just gives the string value of the first.

When rendering a document structure to html as here normally you dont
want to use for-each and value-of at all, but rather apply-templates, so
that the output structure mirrors the input structure.

so you don't need a template matching BUCH as you want the default
processing there
but you do want something like

<xsl:template match="UEBERSCH RIFT">
<h1>
<xsl:apply-templates/>
<h1>
</xsl:template>
<xsl:template match="ZWISCHEN UEBERSCHRIFT">
<h3>
<xsl:apply-templates/>
<h3>
</xsl:template>
<xsl:template match="TEXT">
<p>
<xsl:apply-templates/>
<p>
</xsl:template>

David
--
http://dpcarlisle.blogspot.com
Jun 1 '08 #3
Hi,
I am sorry for not beeing totally precise.
The BUCH or KAPITEL function works fine. What
makes the problem ist the UEBERSCHRIFT-thing.

XSLT-Code says UEBERSCHRIFT can be more than one
(the reference part of my book says so). And I want
to have more than one UEBERSCHRIFT in one KAPITEL.
Even more than one ZWISCHENUEBERSC HRIFT and TEXT.
I don't want to have only one UEBERSCHRIFT and ZWISCHENUEBERSC HRIFT
and TEXT Part in my KAPITEL, because, it makes no sense
to have an extra KAPITEL for a short TEXT which belongs to a
UEBERSCHRIFT.

M.
On Sun, 01 Jun 2008 10:55:04 +0100, David Carlisle
<da********@dca rlisle.demon.co .ukwrote:
>Mi************ **@t-online.de wrote:
>Hi,
I've got another question.
My Code works fine now and I've tried some other functions.
XSLT-Code is now:
<!DOCTYPE BUCH [

That's the dtd not the XSLT, but I assume the xslt is similar to the
code posted in the earlier thread.

<H3>
<xsl:value-of select="ZWISCHE NUEBERSCHRIFT"/>
</H3>
the select="ZWISCHE NUEBERSCHRIFT" does select all those elements but
value-of (in xslt 1) just gives the string value of the first.

When rendering a document structure to html as here normally you dont
want to use for-each and value-of at all, but rather apply-templates, so
that the output structure mirrors the input structure.

so you don't need a template matching BUCH as you want the default
processing there
but you do want something like

<xsl:templat e match="UEBERSCH RIFT">
<h1>
<xsl:apply-templates/>
<h1>
</xsl:template>
<xsl:templat e match="ZWISCHEN UEBERSCHRIFT">
<h3>
<xsl:apply-templates/>
<h3>
</xsl:template>
<xsl:templat e match="TEXT">
<p>
<xsl:apply-templates/>
<p>
</xsl:template>

David
Jun 1 '08 #4
Mi************* *@t-online.de wrote:
Hi,
I am sorry for not beeing totally precise.
The BUCH or KAPITEL function works fine. What
makes the problem ist the UEBERSCHRIFT-thing.

XSLT-Code says UEBERSCHRIFT can be more than one
(the reference part of my book says so). And I want
to have more than one UEBERSCHRIFT in one KAPITEL.
Even more than one ZWISCHENUEBERSC HRIFT and TEXT.
I don't want to have only one UEBERSCHRIFT and ZWISCHENUEBERSC HRIFT
and TEXT Part in my KAPITEL, because, it makes no sense
to have an extra KAPITEL for a short TEXT which belongs to a
UEBERSCHRIFT.
Yes, it is possible (but unusual) to have more than one ueberschrift
in a chapter.

I think you may be confusing the ueberschrift with the concept of a
container like <sectionor <subsection>. XML is normally built on a
hierarchical model or containers, unlike (eg) LaTeX, where headings
are simply interruptions to the flow of text (eg \section{}, not
\begin{section} ...\end{section }).

<!DOCTYPE buch [
<!ELEMENT buch (kapitel)+>
<!ELEMENT kapitel (ueberschrift,t ext+,unterkapit el*)>
<!ELEMENT ueberschrift (#PCDATA)>
<!ELEMENT unterkapitel (ueberschrift,t ext+)>
<!ELEMENT text (#PCDATA)>
]>
<buch>
<kapitel>
<ueberschrift ></ueberschrift>
<text></text>
<text></text>
<text></text>
<unterkapitel >
<ueberschrift ></ueberschrift>
<text></text>
<text></text>
<text></text>
</unterkapitel>
<unterkapitel >
<ueberschrift ></ueberschrift>
<text></text>
<text></text>
<text></text>
</unterkapitel>
<unterkapitel >
<ueberschrift ></ueberschrift>
<text></text>
<text></text>
<text></text>
</unterkapitel>
</kapitel>
<kapitel>
<ueberschrift ></ueberschrift>
<text></text>
</kapitel>
</buch>

///Peter
Jun 1 '08 #5
Hi,
this seems to be the right way, I suppose and therefore
I will try this as soons as possible. And furthermore if
this works for me, I will try to understand it.
thanx
M.

Peter Flynn schrieb:
Mi************* *@t-online.de wrote:
>Hi,
I am sorry for not beeing totally precise.
The BUCH or KAPITEL function works fine. What
makes the problem ist the UEBERSCHRIFT-thing.

XSLT-Code says UEBERSCHRIFT can be more than one
(the reference part of my book says so). And I want
to have more than one UEBERSCHRIFT in one KAPITEL.
Even more than one ZWISCHENUEBERSC HRIFT and TEXT.
I don't want to have only one UEBERSCHRIFT and ZWISCHENUEBERSC HRIFT
and TEXT Part in my KAPITEL, because, it makes no sense
to have an extra KAPITEL for a short TEXT which belongs to a
UEBERSCHRIFT .

Yes, it is possible (but unusual) to have more than one ueberschrift
in a chapter.

I think you may be confusing the ueberschrift with the concept of a
container like <sectionor <subsection>. XML is normally built on a
hierarchical model or containers, unlike (eg) LaTeX, where headings
are simply interruptions to the flow of text (eg \section{}, not
\begin{section} ...\end{section }).

<!DOCTYPE buch [
<!ELEMENT buch (kapitel)+>
<!ELEMENT kapitel (ueberschrift,t ext+,unterkapit el*)>
<!ELEMENT ueberschrift (#PCDATA)>
<!ELEMENT unterkapitel (ueberschrift,t ext+)>
<!ELEMENT text (#PCDATA)>
]>
<buch>
<kapitel>
<ueberschrift ></ueberschrift>
<text></text>
<text></text>
<text></text>
<unterkapitel >
<ueberschrift ></ueberschrift>
<text></text>
<text></text>
<text></text>
</unterkapitel>
<unterkapitel >
<ueberschrift ></ueberschrift>
<text></text>
<text></text>
<text></text>
</unterkapitel>
<unterkapitel >
<ueberschrift ></ueberschrift>
<text></text>
<text></text>
<text></text>
</unterkapitel>
</kapitel>
<kapitel>
<ueberschrift ></ueberschrift>
<text></text>
</kapitel>
</buch>

///Peter
Jun 1 '08 #6

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

Similar topics

3
8607
by: Phil Powell | last post by:
Has anyone here ever done a case where you have a select multiple form element and you have to do both server-side and client-side validation? I am honestly not sure how to do it in Javascript (I keep getting errors thrown that I can't verify because the form processes onto itself too quickly for me to check the Javascript errors) because the select multiple form element name has to be in the form of "var" because PHP will then recognize...
2
1604
by: JeeWee | last post by:
Hi all, I'm looking for a way to "bind" multiple eventhandler function to the same event. In other languages this can often be done by using the += operator, unfortunately this doesn't seem to work. My (working) code for assigning an eventhandler for some form elements is: for( var i = 0; i < document.formx.elements.length; i++ ) { document.formx.elements.readonly = true;
12
8869
by: Forti2ude | last post by:
Hello, I have a simple form... <form> <select name="foo" multiple> <option value="1">one</option> <option value="2">two</option> <option value="3">three</option> </select>
2
3650
by: areef.islam | last post by:
Hi, I am kinda new to javascript and I am having this problem with selecting multiple options from a select tag. Hope someone can help me out here. here is my code /////////////////////////////////////////////////////////////////////////////////////// <form action="whatever.php" method="post"> <select name="zip_code" onchange="makeRequest('getCity.php?state='+this.form.zip_code.options.value)" multiple="multiple" size="20">
4
1453
by: R | last post by:
Hi All, I have problem with sorting nodes I want sort them by columns c1, c2 also I have node <root><sort ActiveField="c0"/></root> ActiveField attribute is set by user. I'm sorting 'row' nodes, 'row' has c0, c1, c2, ..., cn child elements I wrote:
2
1786
by: libsfan01 | last post by:
hi! i have written a function to make visible elements with a certain id. however i intended it to be used to make visible multiple elements but it only appears to switch on the first element it comes to with that id. after that it appears to stop. i was wondering how i can adapt this function to make visible multiple elements, will i need a different way of referencing or can it be done through id? your thoughts are greatly...
5
4946
by: paul_zaoldyeck | last post by:
does anyone know how to validate an xml file against multiple defined schema? can you show me some examples? i'm making here an xml reader.. thank you
2
2269
by: dinkle | last post by:
Hi Y'all, I am pretty new to js and am hitting a few snags. I need to process a multiple select list and pass it onto a PHP script. I can only get the first value in the JS and have no idea how to grab the rest and successfully pass the array onto my php script. No books, foums, examples, tutorials or anything I have spent most of my recent waking hours reading and downtime dreaming about appear to cover this and I am starting to think...
5
3306
by: Neil | last post by:
"lyle" <lyle.fairfield@gmail.comwrote in message news:48c3dde7-07bd-48b8-91c3-e157b703f92b@f3g2000hsg.googlegroups.com... Question for you. I'm doing something similar, only, instead of opening the forms all at once, I'm opening them as needed. I have a main form with multiple records; and then I have a pop-up form that the user opens with button. The pop-up form contains one record relating to the current record in the main form (but...
2
2771
by: helplakshmi | last post by:
Hi All, I am new to php. The form that i am designing has few input input fields with submit and reset button. The functionality of submit and reset are working properly till now. My form <form name="search" id="search" action= "search.php" method = "post" onreset="formReset(this);return false;"> <table cellspacing="1" cellpadding="1" > <tr> <!-- Input field for responsible-->
0
8407
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
8739
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
8512
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
8612
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7347
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
6175
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
5638
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
4171
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...
1
2739
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.