Empty Elements: Breach with Paragraph 2.1.4 of JSP 1.1 Specificat ion?
Hi,
I think I found a violation of the JSP1.1 spec and I'd like to know
opinions if I am correct or if I missed something.
This is what the JSP spec says on empty elements:
2.1.4 Empty Elements
Following the XML specification, an element described using an empty tag
is
indistinguishable from one using a start tag, an empty body, and an end
tag.
Thus there should be no difference between these two custom tags:
1. <sw:cv key="string" number="1" />
2. <sw:cv key="string" number="1"></sw:cv>
While the first compiles fine, the second produces the following error
message on WebLogic 5.1 SP9:
Parsing of JSP File '/layouts/1029128.jsp' failed:
/layouts/1029128.jsp(-1): Error in tag library at: 'sw': The TLD
description for tag 'cv' requires that the body be empty.
probably occurred due to an error in /layouts/1029128.jsp line -1:
I generate my JSPs using an XSLT transformation and the processor
generates the tags with empty elements. I do not see a chance to change
this behaviour. A possible workaround could be to allow a tag body, but
I am afraid of possible side effects (performance, misuse of the tag).
Would you agree that this behaviour is in contradiction to the
specification?
Thanks for your time!
Daniel
Hi,
I think I found a violation of the JSP1.1 spec and I'd like to know
opinions if I am correct or if I missed something.
This is what the JSP spec says on empty elements:
2.1.4 Empty Elements
Following the XML specification, an element described using an empty tag
is
indistinguishable from one using a start tag, an empty body, and an end
tag.
Thus there should be no difference between these two custom tags:
1. <sw:cv key="string" number="1" />
2. <sw:cv key="string" number="1"></sw:cv>
While the first compiles fine, the second produces the following error
message on WebLogic 5.1 SP9:
Parsing of JSP File '/layouts/1029128.jsp' failed:
/layouts/1029128.jsp(-1): Error in tag library at: 'sw': The TLD
description for tag 'cv' requires that the body be empty.
probably occurred due to an error in /layouts/1029128.jsp line -1:
I generate my JSPs using an XSLT transformation and the processor
generates the tags with empty elements. I do not see a chance to change
this behaviour. A possible workaround could be to allow a tag body, but
I am afraid of possible side effects (performance, misuse of the tag).
Would you agree that this behaviour is in contradiction to the
specification?
Thanks for your time!
Daniel
Similar Messages
-
How to delete empty element in popup list
I have a question about a suspicious behaviour in Forms Builder 10.1.2.0.2.
When I have a list object (pop up list) I can define some values in the attribute palette of the object.
So you can set a shown name and a value behind. In this little window to set the items of the popup list you get automatically a white empty item at the end of the list. When I click now on this empty item (you do so, when you want to add an item) Forms Builder automatically adds an new empty item at the end.
When I click this new empty item, Forms Builder adss another empty one ... and so on.
It´s very suspicious because, when I end this dialog with "OK", it will be saved and when I open the form (over web) I have at the end of the list one, two (or more) empty elements in list.
But I can´t delete this empty ones from the list in Forms Builder.
So my question:
how can I delete empty items in a popup list??
I try it with hit "del" button at keyboard or delete the set value for the item (I hope Forms Builder delete items without value). But all does not help.Thanks jwh for this great solution! :)
On my german keyboard it is:
ctrl+< for deleting a line
ctrl+> (= ctrl+shift+<) for adding a new line
Thanks! :)
I have another question (you can maybe help me, too?).
On this popup lists you can have several items. When you open a form (via web) and the list has more than x items (maybe 5 or 6) the form shows a scroll bar on the right side.
Is there any poosibility to set how much items has to show and only show a scroll bar when there are more items in the list?
Or other way: set the maximum of shown items so big, that there will be no scroll bar.
Message was edited by:
ulfk -
JDev deletes empty elements in transform activity
Dear all,
the XSD in my BPEL process defines a "Group" element:
<xs:element name="Groups">
<xs:complexType>
<xs:sequence>
<xs:element name="Group" type="Group_Type" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="Group_Type">
<xs:sequence>
<xs:element name="id" type="xs:int"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="desc" type="xs:string"/>
</xs:sequence>
</xs:complexType>
As one can see, a "Group" element contains three mandatory elements named "id", "name" and "desc". This "Group" element is the output target of an XSLT transform activity in my BPEL process.
In the output target, the "desc" element should be empty (<desc/> or <desc></desc>). Therefore, the corresponding XSLT should look like:
<foo:Group>
<foo:id>
<xsl:value-of select="'do something'"/>
</foo:id>
<foo:name>
<xsl:value-of select="'do something'"/>
</foo:name>
<foo:desc/>
</foo:Group>
First, it is not possible to define an empty element (<desc/>) in the graphical design modus of an XSLT transform activity. Or is there a workaround available?
Second, when inserting the empty element in the source modus => saving the document => changing to the graphical design modus => do something in the graphical design modus => returning to the source modus, the empty element was deleted by JDeveloper! Is there a workaround for this very annoying bug of Jdev?
Thanks in advance!
LarsYou can also append an xml fragment to put back the missing fields....for example:
- Type: Append (Note, this is different than the copy operation)
- From Type: XML Fragment
- From Value:
<ns4:ShipTo xmlns:ns4="http://www.globalcompany.com/ns/order">
<ns4:Name>
<ns4:First/>
<ns4:Last/>
</ns4:Name>
</ns4:ShipTo>
(Replace ns4 in this example with your namespace .)
- To Type: Variable -
Xml loading and empty elements
Hi,
I'm having problems with Flex and xml data.
I've created an app to edit pre-existing xml files or create new xml files, which are then saved out. The xml node structure is defined (and cannot be changed as it's widely used across the company and it's associates).
The problem is that as soon as the xml is loaded using a URLLoader class, any xml nodes that are empty are changed from:
<nodename></nodename>
to
<nodename />
This is how the data is traced out / saved, but this is useless to me as I need to keep the existing structure as the file may be edited outside of the app.
Is there a way to prevent the xml data from being changed in this way? Adobe's own documentation even says:
'If an element contains no content, it can be written as an empty element (sometimes called a self-closing element). In XML, this element:<lastplayed/> is identical to this element: <lastplayed></lastplayed>'.
In which case, why does this get re-written all the time?
If anyone can help with this I'd be really grateful, as I just can't find a way to solve this.
Thanks,
ferdyferretIs there really no answer to prevent this then?
ferdyferret -
[CS5-5.5][JS] Replace xml element content with user selection
Hi,
I'm trying to write a script that replaces xml element content with a user selection.
I have document containing a textframe with a "root" tag attached. In this frame I have 2 paragraphs, each tagged with a different tag.
I would like to replace the content of one of the paragraphs with the content of a text selection.
This piece of code doesn't seem to work:
myXMLElement.xmlContent = app.selection[0];
The problem is that almost all properties of the xmlelement (paragraphs, words, etc) are read-only.
Does anyone have any suggestion?
ThanxIt depends on whether you want to maintain formatting. You can use
myXMLElement.contents = app.selection[0].contents;
in the (unlikely?) event that you don't mind blowing away the formatting. Otherwise you'll want to use something like:
myXMLElement.xmlContent.remove();
app.selection[0].duplicate(LocationOptions.AT_BEGINNING, myXMLElement.xmlContent);
Jeff -
How to handle where xmltype has empty elements
Here is my problem:
I have some information stored in table1 and some information in table2.These tables are joined with a key.
Table2 has an xmltype column. That stores if
anything (any info) has been overridden. That is has changed. There is information in this table even when nothing is overridden. In that
case the xmltype has blank elements.
In my query I have to display all records where the information has been overridden.That is fine as I extract from xmltype column using xmlsequence.
The issue arises when I need to display information when it is not overridden. In that case since the xmltype has empty
elements, the query doesnt return anything (NO RECORDS).Here it is not overridden
<?xml version="1.0" encoding="UTF-8"?>
<O><AR></AR>
</O>Here is an example where it is overridden</br>
<?xml version="1.0" encoding="UTF-8"?>
<O><AR>
<L id="A">
<LL>4</LL>
</L>
<L id="B">
<LL>2.5</LL>
</L>
</AR>
</O>My query is something like:
select....
,extractValue(k.column_value,'/L/@id') as lt,
extractValue(k.column_value,'/L/LL') AS ll,
FROM TABLE1 T1, TABLE2 T2,
, table(xmlsequence(T2.XMLCOL.extract('/O/AR/L')))k
WHERE ...So to tackle this problem of nothing being returned just because xmltype doesnt have overridden values, i have a query (using union to other)
that says select null for the xmltype elements that I am selecting.
I handle null as follows:
select null as lt,null as ll......
from ....This returns me a row even if something is overridden. I want a row from this null query only if it is not being returned from the other query.
I know confusing but...:-(I am all set. Added something in where condition. Work around that would work:)
-
OSB: Payload validation required for empty elements inside OSB process.
Hello
I need to validate the payload for non-empty elements. If the payload is completely empty then OSB should throw an error that the submitted payload is empty.
If the payload contains at least one element then it should pass through.
As in process to test this particular one, i have tried with the following code to generally validate for an element.
xquery version "1.0" encoding "Cp1252";
(:: pragma bea:global-element-parameter parameter="$inputParameters1" element="ns0:InputParameters" location="../adapter/StoreProcDB/xsd/StoreProcDBService_sp.xsd" ::)
(:: pragma bea:schema-type-return type="ns1:Validation" location="../xsd/validation.xsd" ::)
declare namespace xf = "http://tempuri.org/StoreProc_osb/transformation/PayloadValidation/";
declare namespace ns1 = "http://www.sigmainfo.com/validation";
declare namespace ns0 = "http://xmlns.oracle.com/pcbpel/adapter/db/sp/StoreProcDBService";
declare function xf:PayloadValidation($inputParameters1 as element(ns0:InputParameters))
as element()
<ns1:Validation>
<ns1:Payload>{$inputParameters1/.}</ns1:Payload>
<ns1:ValidationErrorList>
(: BEGIN - Required Field Validations :)
(: if (empty($inputParameters1/ns0:ACCOUNTNUMBER/text())) then
<ns1:ValidationError>
<ns1:code>1</ns1:code>
<ns1:message>ACCOUNTNUMBER: Required Field</ns1:message>
</ns1:ValidationError> :)
if (empty($inputParameters1/ns0:AUDITUSER/text())) then
<ns1:ValidationError>
<ns1:code>1</ns1:code>
<ns1:message>AUDITUSER: Required Field</ns1:message>
</ns1:ValidationError>
else ''
(: END - Required Field Validations :)
</ns1:ValidationErrorList>
</ns1:Validation>
declare variable $inputParameters1 as element(ns0:InputParameters) external;
xf:PayloadValidation($inputParameters1)
But it throws the following error:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
REQUEST DOCUMENT:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
</soap:Header>
<soapenv:Body>
<stor:InputParameters
xmlns:stor="http://xmlns.oracle.com/pcbpel/adapter/db/sp/StoreProcDBService">
<!--Optional:-->
<stor:P_ACCOUNTNUMBER>00101</stor:P_ACCOUNTNUMBER>
<!--Optional:-->
<stor:P_AUDITUSER>venkat</stor:P_AUDITUSER>
</stor:InputParameters>
</soapenv:Body>
</soapenv:Envelope>
RESPONSE DOCUMENT:
The invocation resulted in an error: . <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>BEA-382505: OSB Validate action failed validation</faultstring><detail><con:fault xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>BEA-382505</con:errorCode>
<con:reason>OSB Validate action failed validation</con:reason>
<con:details>
<con1:ValidationFailureDetail xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">
<con1:message>
Incompatible elements: expected an XML instance of name "{http://xmlns.oracle.com/pcbpel/adapter/db/sp/StoreProcDBService}InputParameters", but found an XML instance of name "{http://schemas.xmlsoap.org/soap/envelope/}Body".
</con1:message>
<con1:xmlLocation/>
</con1:ValidationFailureDetail>
</con:details>
<con:location>
<con:node>PipelinePairNode1</con:node>
<con:pipeline>PipelinePairNode1_request</con:pipeline>
<con:stage>stage1</con:stage>
<con:path>request-pipeline</con:path>
</con:location>
</con:fault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
But this is not the way it should be done as i progress.
Please suggest a simple way to have a pragma with sample and complete validation for the input payload.
Appreciate your help in advance
Regards
VenkatVenkat,
Find below url's for implementing security policies in OSB
http://docs.oracle.com/cd/E17904_01/doc.1111/e15866/owsm.htm#CHDEEGJI
http://docs.oracle.com/cd/E17904_01/doc.1111/e15866/owsm.htm#CHDBIJHD
http://niallcblogs.blogspot.in/2010/07/osb-11g-and-wsm.html
http://biemond.blogspot.in/2009/06/ws-security-in-osb.html
Regards,
Abhinav -
Detect empty element in cluster
Hi,
I want to know if there is a way to detect empty elements on a cluster, with no dependencies on the type/format of the cluster.
I have tried to construct a function with a cluster reference input, use property node "Controls[]" and then check the value in every element in a for loop. But in this approach, if i alter the cluster format, i have to change the reference input.
Is it possible to do detect empty elements in different way that could apply to all clusters without changes?Clusters with different elements (as type or number of elements rather than different values of an element) are different datatypes. LabVIEW is a strictly typed language meaning that you cannot easily connect different datatypes together.
You could use variants as the input control which would allow you to connect anything, but meaningful comparisons are still difficult.
Can you tell us more about what you are actually trying to do? There is probably a better way to accomplish your goal.
Lynn -
How to avoid empty elements in generated xml text
I am using XMLBeans to generate xml.
If I set text value for a tag then it displaying like
<param name="org">Satyam</param>
If I set empty text value for the same tag it generateing xml text like
<param name="org"/>
But I don't need empty elements in generated xml like this way. Even though I set empty text to a tag it has to display like
<param name="org"></param>
How can I do this one.
Message was edited by Mouli at Dec 14, 2004 2:55 AMHi,
by the book these two representations are identical
<.... />
<....></....>
as for the XML-parser.
What problem are you facing with the <... /> representation?
I will try to investigate a bit to see if the XMLBean can be forced to write the <....></....> representation.
- Anders M. -
Adobe Premiere Elements 10 with Photoshop Elements 9
Is it possible to use both Adobe Premiere Elements 10 with Adobe Photoshop Elements 9?
I don't want to upgrade Adobe Photoshop Elements 9 because has not enought new functions but need new Premiere with Organizer.
Does Adobe Photoshop Elements 9 will work correctly with Organizer of Premiere 10?Hi,
It is possible to use both of them, seperately though. If you wish to do use some interoperable feature, that wont be possible, since, as Steve said, they both use thier respective organizer. -
Is it true that keep options is not working with paragraph span? (CS5)
Hi all,
Just wanted to confiem that keep options does not work with Paragraph span.
thanks,
shlomitThat's correct for now. Perhaps in CS6....
-
Error message while burning DVD with Premiere Elements 13 with Mac Book Pro i7/7200t/mn with 60GO free space available on gard drive. message: "erreur logicielle interne: DVA/premiere/elements/pre12/pre-mediacoreCS7". can someone help burn my DVD (the file goes very well with chapters and scenes before burning). thanks very much, response appreciated, Alain
-
How do I make a 20 X 30 print with layers of 16 X 20, 12 X 18, 11 X 14, 8 X 12, 8 X 10, 5 X 7 and 4 X 6 of the same image to display the different sizes available to someone? Using Elements 13 with Windows 8.1
A senior citizen needs some help.
ThanksSaving each image as different size - is it an option for you? I would save images with their name as: 20x30.png, 16x20.png etc etc.
Or explain whether you want these in a webpage in which case only one image is necessary and different sizes are displayed with good CSS code. this is question for Dreamweaver forum if this is what you want. -
Windows 8 and Elements 11 with premier
Cannot get Elements 11 with premier to download. Keeps telling me my IE needs to be 4 or higher. Running windows 8, IE 10, with an embedded flash player 11.3, any ideas why this error keeps occuring and preventing me from downloading the software?
Similar to your problem, but it crashes during launch, not after a period of use. I posted this at DPReview to see if anyone there has some insights:
I just rebuilt my PC as the machine was suffering random hardware crashes. So I took the opportunity to migrate to Windows 8 (with a format and clean install, not upgrade) and also upgrade a few other bits, e.g Elements from 8 to 11. Most stuff works, but Elements 11 just refuses to start.
Running the Elements launcher does nothing (it fails before anything appears). Running the Editor directly from the Program File folder shows the splash screen, but then Windows shows a dialogue saying the app has stopped working. I've tried compatibility mode and running as admin (it throws a UAC dialogue, which is odd for an app designed to run as a normal user under Windows 8).
The Event Viewer shows the crash coming from the call to ntdll.dll:
PhotoshopElementsEditor.exe
11.0.0.0
505d12ab
ntdll.dll
6.2.9200.16420
505aaa82
c0000005
0004f7d5
f78
01cdd9e7f71d02bf
C:\Program Files (x86)\Adobe\Photoshop Elements 11\PhotoshopElementsEditor.exe
C:\Windows\SYSTEM32\ntdll.dll
38b995ea-45db-11e2-be75-50465d517d2b
My other software works fine, including Lightroom 4.3 and Reader XI, so it's not a general Adobe or Windows problem.
I've searched around, but there's not much help out there. There were suggestions to delete the contents of the User/AppData/Roaming/Adobe folder, but that didn't help. Uninstalling and reinstalling doesn't change anything. I even downloaded the trial version from Adobe to see if that was more recent than the DVD, but it seems to be the same version number (from 22nd September 2012) and suffers the same issue.
So, has anyone else got this software to work on Windows 8 Pro? If so, did it "just work", or did you have to do anything? -
Want to create an oval vignette in photoshop elements 10 with transparent background for printing w
I am fairly new to PSE and I want to create an oval vignette in Photoshop Elements 10 with transparent background for printing on white paper using MS Publisher. Using the white background on inverse selection makes a slight line impression and either it should have a defined "frame" or nothing.
Appreciate any guidance.Try with the Elliptical marquee tool:
On the tool's option bar set feather 25-40 px (experiment)
Drag out the Ellipse to embrace the object
Go to Layer>new>layer via copy, or CTRL+J
Your selection should fade out as a vignette and be surrounded by transparency
Save this layer via File>save for web, select PNG-24, and tick "Transparency"
Maybe you are looking for
-
Hi, I am new with Macromedia Flash. I want to create a line that will underline a name. But the line will underline the name gradually like: _, __, ___, ____. But i don't know how to do this. I know the "Create tween" function but with a line it don'
-
Dll file to change monitor resolution to 1024*768
hi, i want to change my computer monitor resolution to 1024*768 programatically. If anybody have this .dll file please suggest me so that i can call this dll in labview apllication and will set my PC resolution to 1024*768 . Please do the needful. R
-
ORA-00911 error creating a view with PL/SQL
Hello. Working with SQL Developer, I'm trying to write a procedure that creates a view. After a successful compilation, each time I try to execute it I get an ORA-00911 error and I'm not able to find the reason. Here's my code. Thanks in advance. C
-
how can i use "document/decrease file size" using a batch file to decrease a PDF file size ?
-
I'm using testend 3.1 & labview 7.1. For testing my UUT I'm using RS232 comunication. I want to create a form using labview that will show all traffic via the rs232 port. The problem is that the form is disappeared when I'm calling other vi from tes