ESD context-setting shaped based on XML attributes
Hi all
I have some difficulty to get my EDD to format correctly based on the XML attributes. Basically, what I would like is:
I have a few XML:
< root >
< elem > example text sample text sample text sample text. < / elem >
< elem multi = "true" > example text example text example text sample text. < / elem >
< / root >
For items with the multi = 'true' attribute, I want to be prefixed by a ball and with a left indent of 0.14"in order to align the text with the ball.
• Example text sample text
example text sample text.
Those without the attribute are simply formatted according to the paragraph format (no prefix, 0.0 left indent ")
Example text sample text
example text sample text.
My EDD looks like this:
(Container) element: elem
General rule: < ANY >
List of attributes
Name: multi String
Rules of prefix
If the context is: [multi = 'true']
Prefix: •
Text format rules
Paragraph element format: element
If the context is: [multi = 'true']
Basic properties
Dashes
Withdrawal left: 0.14 "
After importing my XML, the prefix part works perfectly. No problem.
However, the left based on the context does not work at all - all items inherit only the removal of paragraph (0.0 "). So it ends up looking like this:
• Example text sample text
example text sample text.
I can't understand this. No formatting in ESD does not replace the formats specified paragraph or something?
Any help would be greatly appreciated.
Thank you
Carl
Please do not take into account the incomplete answer, it seems to me having posted. What I started to say is:
Carl,
Format of the item rules override formatting that it inherits from its parent, as well as modalities parentElement must not interfere with those that you specify for prim.
I don't see the problem, and without actually opening the file in FM, it is difficult for me to guess what might be wrong. A number of things that I do are:
(1) set another property in the
(2) inspect the left indent in paragraph Designer. Maybe you have set it to 0.14pt instead of 0.14 to? -Lynne
Tags: Adobe FrameMaker
Similar Questions
-
Set XML attributes to multiply items
Hello world
This is my situation. I have a document with multiple pages and multiple objects on each page.
now, I want to get the coordinates and dimensions of an object and write the data as an XML attribute.
The script should do this for each object in my document.
That's what I got so far:
function creatAtt() {}
for (var i = 0; i < app.selection.length; i ++) {}
var myObject = app.selection [i];
var myXMLobject = myObject.associatedXMLElement;
var ycoords = myObject.geometricBounds [0];
var xcoords = myObject.geometricBounds [1];
var width = myObject.geometricBounds [3] - myObject.geometricBounds [1];
var height = myObject.geometricBounds [2] - myObject.geometricBounds [0];
myXMLobject.xmlAttributes.add ("Y-coordinate", ycoords.toString () + "px");
myXMLobject.xmlAttributes.add ("X-coordinate", xcoords.toString () + "px");
myXMLobject.xmlAttributes.add ("Width", width.toString () + "px");
myXMLobject.xmlAttributes.add ('Height', height.toString () + "px");
}
}
creatAtt();
When I select an object and run the script he writes only the data for the selected object, not for all objects. Someone a tip how to fix?
Hi Sebbomatico,
Now, I remove the attributes at the beginning and after I generated. Please check this code and the snapshot.
var myDoc= app.activeDocument; var myPages = myDoc.pages; for (var i = 0; i < myPages.length; i++){ var myActualPage = myPages[i].pageItems; for (var j = 0; j < myActualPage.length; j++){ var myObject= myActualPage[j]; var myXMLobject = myObject.associatedXMLElement; var ycoords= myObject.geometricBounds[0]; var xcoords= myObject.geometricBounds[1]; var width = myObject.geometricBounds[3] - myObject.geometricBounds[1]; var height = myObject.geometricBounds[2] - myObject.geometricBounds[0]; try{myXMLobject.xmlAttributes.everyItem().remove();}catch(e){}; myXMLobject.xmlAttributes.add ("Y-Koordinate", ycoords.toString() + " px"); myXMLobject.xmlAttributes.add ("X-Koordinate", xcoords.toString() + " px"); myXMLobject.xmlAttributes.add ("Width", width.toString() + " px"); myXMLobject.xmlAttributes.add ("Height", height.toString() + " px"); } }
-
How to normalize/linearize whitspace in XML attributes?
Hello
I have data in a CLOB column I need to appeal to an XML attribute. The data may contain CR, LF and tabs - that the XML must be preserve way standardized/linearized (that is to say using & #10; & #13; etc.)
I tried using XMLROOT - it deletes the line a total break.
I tried to use XMLSERIALIZE - when finished with clause VERSION it also suppresses the newline, when without the VERSION, it keeps the jump line but not standardized.
Do not use these preserves the jump line - but not standardized.
Is there a bed in order to standardize XML - or should I use replace nested?
Examples below.
Thanks in advance.
SQL> set long 20000 SQL> set lines 1000 SQL> set pages 1000 SQL> select * from v$version BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production PL/SQL Release 11.2.0.3.0 - Production CORE 11.2.0.3.0 Production TNS for Linux: Version 11.2.0.3.0 - Production NLSRTL Version 11.2.0.3.0 - Production 5 rows selected. SQL> -- as XMLTYPE, newline (chr(10)) is preserved, but not normalized SQL> select XMLELEMENT("A", XMLATTRIBUTES(1 as ID, 2 ||chr(10)||3 as "TXT") ) from dual XMLELEMENT("A",XMLATTRIBUTES(1ASID,2||CHR(10)||3AS"TXT")) --------------------------------------------------------- <A ID="1" TXT="2 3"></A> 1 row selected. SQL> -- as CLOB, newline (chr(10)) is preserved, but not normalized SQL> select XMLELEMENT("A", XMLATTRIBUTES(1 as ID, 2 ||chr(10)||3 as "TXT") ).getclobval() from dual XMLELEMENT("A",XMLATTRIBUTES(1ASID,2||CHR(10)||3AS"TXT")).GETCLOBVAL() ---------------------------------------------------------------------- <A ID="1" TXT="2 3"></A> 1 row selected. SQL> -- with XMLROOT - newline is removed SQL> select XMLROOT( XMLELEMENT("A", XMLATTRIBUTES(1 as ID, 2 ||chr(10)||3 as "TXT") ), VERSION '1.0') from dual XMLROOT(XMLELEMENT("A",XMLATTRIBUTES(1ASID,2||CHR(10)||3AS"TXT")),VERSION'1.0') ------------------------------------------------------------------------------- <?xml version="1.0"?> <A ID="1" TXT="2 3"/> 1 row selected. SQL> --with XMLSERIALIZE without VERSION clause - newline is preserved but not normalized SQL> select XMLSERIALIZE(DOCUMENT XMLELEMENT("A", XMLATTRIBUTES(1 as ID, 2 ||chr(10)||3 as "TXT") ) ) from dual XMLSERIALIZE(DOCUMENTXMLELEMENT("A",XMLATTRIBUTES(1ASID,2||CHR(10)||3AS"TXT"))) ------------------------------------------------------------------------------- <A ID="1" TXT="2 3"></A> 1 row selected. SQL> --with XMLSERIALIZE with VERSION clause - newline is removed SQL> select XMLSERIALIZE(DOCUMENT XMLELEMENT("A", XMLATTRIBUTES(1 as ID, 2 ||chr(10)||3 as "TXT") ) VERSION '1.0') from dual XMLSERIALIZE(DOCUMENTXMLELEMENT("A",XMLATTRIBUTES(1ASID,2||CHR(10)||3AS"TXT"))VERSION'1.0') ------------------------------------------------------------------------------------------- <A ID="1" TXT="2 3"/> 1 row selected. SQL> --doing replace works, but seems "un-natural" and very inefficient SQL> select replace( XMLELEMENT("A", XMLATTRIBUTES(1 as ID, 2 ||chr(10)||3 as "TXT") ), chr(10),' ') from dual REPLACE(XMLELEMENT("A",XMLATTRIBUTES(1ASID,2||CHR(10)||3AS"TXT")),CHR(10),' ') ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- <A ID="1" TXT="2 3"></A> 1 row selected.
Question still pending, if anyone has another way - or knows for sure replace is the only option.
Replaces nesting calls is probably the only option, of course, but not the way you have tried in your examples.
Do replace it at an earlier stage, directly on the data source.
Here's how I'd do:
SQL> set define off SQL> SQL> SQL> select xmlserialize(document 2 xmlelement("A", 3 xmlattributes(noentityescaping 4 1 as id 5 , replace( 6 dbms_xmlgen.convert('X'||chr(10)||'Y') 7 , chr(10) 8 , ' ' 9 ) as txt 10 ) 11 ) 12 no indent 13 ) 14 from dual ; XMLSERIALIZE(DOCUMENTXMLELEMEN --------------------------------------------------------------------------------
1. use DBMS_XMLGEN. CONVERT to handle reserved characters.
2-using REPLACE to manage a specific entity escape
Option NOENTITYESCAPING 3 - use to keep the entity references comes to be presented
-
dbms_xmlgen->; create oracle XML attribute with value type
I use the dbms_xmlgen to create my xml message and I use the oracle TYPEs to create xml message elements.
I need to create something like this:
< type Emp 'name' = > xyz < / Emp >
I tried to create the type as below
create type emp_t as an object ("type" "@type")...
But do not know how I need to set the value of this attribute.
Help, please. Thanks in advance for your help.Can be
SQL> select * from v$version where rownum=1; BANNER ---------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod SQL> SQL> select dbms_xmlgen.getxml('select ename, ''name'' as "@type" from emp') from dual; DBMS_XMLGEN.GETXML('SELECTENAM --------------------------------------------------------------------------------
SMITH ALLEN WARD SQL>
-
Enforcement of XML attribute with a structure?
I use xmlParse() to read an XML file into a structure and then deal with the structure (replace some of the XML attributes) and then write structure back as an XML file. The problem is that I lost the original order of the XML attributes when I convert a structure and instead end up with a new attribute for each element that is alphabetical order.
In other: c = 'text' d = 'text' element has = "text" / >
be rewritten in the form: element = 'text' c = 'text' d = "text" / >
which is a problem for this application.
Is it possible to work with XML in CF but keep ordering attribute (LinkedHashMap instead of a structure, perhaps)?
Thank you.
Walter
If you need to control the order of the attributes, you must write your xml code on hand, according to the XML specification, ordering attribute must not be important, so strictly speaking your condition here requires something XML which is contrary to his intention. And, therefore, has no way of making CF respect something that inherently isn't supposed to be respected.
NB: "I use xmlParse() to read an XML file in a structure"... xmlParse() creates an XML object, not a struct, so what you ask in your last paragraph doesn't really sense. xmlParse() will only create an XML object. If you want to read the XML data as something else than XML, you need to write your own function.
The best solution here, if poss, is to remove the importance of the order attribute in your application, because it is "wrong" to deduct any order, and you do a little logic a rod for your own back based on this ranking.
Not an answer 'just do it like this', I'm sorry, but that's what you get when the question is immersed in a Pandora's box... ;-)
--
Adam -
How to remove nodes based on its attribute?
Sorry, I'll stop asking that much in the forum and try it myself, but I have another problem. . I would like to be able to remove a node based on its attribute 'id' to the node "ads". ?????
Here's the xml script:
< page id = "Page1" >
< ads id '0' = >
File1 < adfile > < / adfile >
< adwidth > 1 < / adwidth >
< adheight > 50 < / adheight >
< adposx > 212 < / adposx >
< adposy > 375 < / adposy >
< / ads >
< ads id = "1" >
File2 < adfile > < / adfile >
< adwidth > 1 < / adwidth >
< adheight > 50 < / adheight >
< adposx > 7 < / adposx >
< adposy > 69 < / adposy >
< / ads >
< ads id = "2" >
< adfile > file3 < / adfile >
< adwidth > 1 < / adwidth >
< adheight > 50 < / adheight >
< adposx > 83 < / adposx >
< adposy > 303 < / adposy >
< / ads >
< / print this page >
< / pages >I tried that, but it did not work:
function deleteme(evt:MouseEvent):void {}
var who_Id:int = evt.target.parent.parent.id; just to get the identification number
var who:String = evt.target.parent.parent.name;
this.removeChild (evt.target.parent.parent);
This.evt.Target.parent.parent = null;
Delete Pages.page.adverts. (@id == who_Id); can change by a number of test who_Id
trace (pages);
}It could be a simple as:
delete xml.page.adverts [who_Id];
But once that a node is deleted names numbers would correspond more is the number of the node.
Then maybe you're looking for this:
var xml =
File1 1 50 212 375 File2 1 50 7 69 file3 1 50 83 303 var who_Id:int = 1;
for (var i: Number = 0; i< xml.page.adverts.length();="" i++)=""> >
If (xml.page.adverts[i].@id==String (who_Id)) {}
delete xml.page.adverts [i];
}
}
trace (XML);
-
Tracing a clips on the stage, based on XML
Hi all
I'm having a problem drawing a clip with AS2 on the stage based on XML. I think her looping thought the XML, but for some reason any its not draw all the clips on the timeline...
So what I'm trying to do, is to trace a clip online based on its < note_position > and < note_height >, which he does very well. But its not trace all nodes < note >... trace 2 clips of < comment > < line tNom = "Name 1" color = "0 x 336633" > then it trace clips < note > 1 < line tNom = "Name 2" color = "0 x 333366" > then he traces 2 clips of < comment > < line tNom = "Name 3" color = '0 x 663366' >
what he must do, is to trace all the clips of < comment > < line tNom = "Name 1" color = "0 x 336633" > then draw all the clips of < comment > < line tNom = "Name 2" color = "0 x 333366" > and last but not least draw all clips from < comment > < line tNom = "Name 3" color = '0 x 663366' >...
So all in all it does is plotted 5 < note > clips in total instead of the 10 < note > clips must be traced on the stage...
OK well I think I'm going to loos, my mind... Is more, I think that it is thought looping the XML that is the problem. I think that its so be it I enclose the clip of the plot or something I don't see thought the fog...
Any ideas? Ive been battaling this for two days and I am at a total loss... so any help would be greatly apprecated.
I thank in advance
Scott: eek:
OK, I got this work here is my fix...
function attachXMLNodes () {}
Attach the clip and insert my data
var newPlot = attachMovie ("plot", "plot" + h + "" + i, this.getNextHighestDepth ());
duplicateMovieClip ("plot", "plot" + i, depth);
Assign the values...
This ["conspiracy" + h + "" + i].entry_clip.entry_date = "" + entry_date + ""; "
Finally, set the position
This ['plot' + h + ' ' + i] ._y = 685;
This ['plot' + h + ' ' + i] ._x = number (entry_pos).}
-
How can I set the scope of the attributes are incompatible error in Windows 8 pro?
How can I set the scope of the attributes are incompatible error in Windows 8 pro?
Whenever I try to run a setup.exe file, it gives me this error. What can I do to fix this?Help, please!WOAH ARE RESISTING NOT EVERYONE!
THERE IS A MUCH EASIER WAY TO DO THIS!Well, I looked for a solution on google (Yes google) for 20 minutes and found four sites that had a bajillion ways to solve this problem.Dang, I was wrong. So, when I dropped, I searched it on youtube, and here's what I got it is frighteningly SIMPLE!These are the? indications that I give to you people of the video (easier to look at):1 right-click the volume in the taskbar icon, and select sounds2. scroll down about 3/4 on the events program: the list and select the option that says Windows user account control3. change the sounds: option ( no), and then click OKYOU ARE FINISHED NOW, AND THE PROBLEM IS SOLVED... I have no idea how it works, but it doesn't... I AM IN AWE IN FRONT OF -
I need to replace the 'M05_LEMO9433_06_SE_CH05' to M05_LEMO5401_06_SE_CH05 xml attribute value
In the document with more than thousand entries
I used the following code but it does not work
function AddReturns() {}
myIdName = "AddReturns";
This.XPath = "//p//span//a";
This.Apply = function (myElement, myRuleProcessor) {}
with (MyElement)
{
try {}
If (myElement.xmlAttributes.item("href").value.match ("LEMO9433"))
{
Fig var = myElement.xmlAttributes.itemByName("href").value;
var fig.replace = figv ("9433', 'O5401')
myElement.xmlAttributes.itemByName("href").value = figv;
}
myElement.xmlAttributes.item("id").name = "olinkend";
} catch (e) {}
}
Returns true;
}
}
Try this:
var main = function() { var root, xes, n, ov = "M05_LEMO9433_06_SE_CH05", nv = "M05_LEMO5401_06_SE_CH05"; if ( !app.documents.length ) return; root = app.activeDocument.xmlElements[0]; xes = root.evaluateXPathExpression ("//*[@*='"+ov+"']" ); n = xes.length; while ( n-- ) { changeAttributeValue ( xes[n], ov, nv ); } } var changeAttributeValue = function ( xe, oldValue, newValue ) { var xas = xe.xmlAttributes, xa, n = xas.length; while ( n-- ) { xa = xas[n]; xa.value == oldValue && xa.value = newValue; } } main();
-
The Dimension members based on the attribute filtering
Hi all
In Hyperion Planning 11.1.2.2 classic Application, is there a way by which we can display values of members on data based on the attribute form; for example
If we have the dimension entity having the list of universities and corresponding attribute category have values as medical, General and engineering.
I want only members of entities on form having value attribute equal to the General category.
Check this box: Selection of members
See you soon... !!
Rahul S.
-
How to handle xml attributes?
Hallo,
I am new to Livecycle and I have some difficulties to understand how reading/identification of the attributes XML in LiveCycle Designer.
If I drag-and - drop items (#data of display data), they appear without problems. But if I drag an attribute (@attributename) they always show the empty to the PDF.
For example, I have an XML file that looks like this:
< product >
....
< price >
< ParamPrice visible = "true" >
< prixUn visible = "false" > 1.350,00 < / prixUn >
< priceB visible = "true" > 1.350,00 < / priceB >
< price visible = "true" > 20.00 < / price >
< price visible = "false" > 0,00 < / price >
< / if >
< NouveauPrix visible = "true" >
< prixUn visible = "false" > 1.350,00 < / prixUn >
< priceB visible = "true" > 1.350,00 < / priceB >
< price visible = "true" > 20.00 < / price >
< price visible = "false" > 0,00 < / price >
< / sonderpreise >
< / price >
...
< / product >
I tried to link like this: price.oldprice. (visible.value == "true") .priceA, but it does not work.
I can´t really find some good information about the manipulation of XML attribute in LiveCycle. Can you please help me or tell me where to find more information on this topic.
Thank you!!!
What about Kat
It is not the relationship between the presence of the object property and your visible attribute to date.
But you can use a script to create such a thing.
Put this in the event layout: ready for a text field, you want to be hidden or shown depending on the value of the visible attributes.
this.presence = this.dataNode.visible.value === "true" ? "visible" : "hidden";
-
Are there ETA on when this will be resolved?
' Tics launch from landscape to portrait image when aspectRatio is set to landscape application.xml (3916056).
I second this question. Pending launch a new Adobe app?
-
Can declaratively set the value of some attributes depend on an attribute in a row of VO?
Hi, experts.
In jdev 11.1.2.3,.
Can declaratively set the value of some attributes depend on an attribute in a row of VO?
For example, there is a VO (id, salt boolean, integer status, entire IsValid), how to set status=-1,IsValid=-1 when salt is checked (selected)?
I tried:
Method A:
1 set the status depends on saltand the default attribute value:
If (salt is true)
Returns - 1
on the other
{
If (salt is false)
Returns 0
on the other
Returns a null value
}
2. set IsValid dependent statusand attributes by default as: status.
3. set all of these three attributes can be changed to always.
If the parameter above may work, then apparently it's much simpler to write Java code.
Unfortunately, he is unable to work the way you want.
There is some complex another declaratively to do:
Method B:
1. create a selVO (id, booleanValue1 boolean, integer numberValue1, string stringValue1) with static values:
(1, false, 0, "" false for salt: not selected ' ");
(2, true,-1, "" the true value of salt: selected ' ");
2. put selVO as Data Source list for the list of the salt value and return values from the list:
Salt-> booleanValue1,
Status-> numberValue1,
IsValid-> numberValue1.
But this alternative way has a few weaks a fortiori more complex:
Advice from the interface user of salt can not defined by default list Type "CheckBox".
Cannot, therefore, method A feasible?
Thank you!
BAO
Hello Bao,
You can write THE Expression value of Field2
#{bindings. Field1.inputValue == 'Y '? 1:-1}
(Auto submit True on Field1
Field1 Field2 on partial trigger)
Also, you can write logic in VORowimpl Set accessor methods.
Thank you
Jeet
-
How to remove the value of the XML attribute in the Indesign file with javascript
Hi all
How to remove the value of the XML attribute in the Indesign file.
What error is this?
in any case try this as well (one another),
var myDoc = app.activeDocument; attrDelete(myDoc); function attrDelete(elm) { for (var i = 0; i < elm.xmlElements.length; i++) { try{ for(j=0; j
Vandy
-
Can someone please tell me the "see correct / more effective to get the 'status' XML ' attributes (ID, CssClass, Description and IsActive to the XML code below):
Implementation will be the standalone .swf file
(XML)
<ArrayOfLineStatus>
<LineStatus ID="0" StatusDetails="">
<BranchDisruptions/><Line ID="1" Name="Bakerloo"/>
<Status ID="GS" CssClass="GoodService" Description="Good Service" IsActive="true">
<StatusType ID="1" Description="Line"/></Status></LineStatus>
</ArrayOfLineStatus>< ArrayOfLineStatus >
< LineStatus ID = "0" StatusDetails = "" >
< BranchDisruptions / >
< line ID = "1" Name = "Bakerloo" / >
< State ID = 'GS' CssClass = "GoodService" Description = "Good Service" IsActive = "true" >
< StatusType ID = '1' Description = 'Line' / > < / status >
< / LineStatus >
< / ArrayOfLineStatus >
There is no good way with as2:
trace(this.firstChild.childNodes[1].childNodes[4].) Attributes ['ID']);
trace(this.firstChild.childNodes[1].childNodes[4].) Attributes ['CssClass']);
etc.
Maybe you are looking for
-
cost of shipping &; import
I want to order an iphone 16 GB in Greece/Crete MC. Anyone know the cost of delivery and import taxes?
-
Can I use an A1436 Magsafe 45W on a Macbook Pro retina 2015?
My mother just bought a Macbook Air from 2012 and she a 45W Magsafe A1436 with her charger. I would like to know if it is OK to use it with my Macbook Pro retina 2015. If you google Magsafe A1436, you will find some results saying it's a Magsafe 2 ch
-
VI Analyzer: reentrancy and USR test
I am developing a test of custom parser VI, following the steps given here: design a VI Analyzer Test custom, that will check the status of reentrancy a VI. If it is reentrant - I then want to check for all while loops with uninitialized records the
-
The screen reduces to the right. How should I do?
original title; I hit the wrong icon in the upper right of the screen. the screen reduces to the right. How should I do? The right side of the screen is hidden so I can't disconnect from the program I was on that.
-
New computer with 7 installed - tried windows update and stuck saying preparation set up windows
Just bought a new Sony Vaio with windows 7 installed and went to windows updates, as they recommended. Updated and said to reboot. Now he's stuck saying prearing to set up windows. Not turned off your computer. Help please...