--update-- maybe someone can assume another possibility so split a .docxdocument into its chapters, importing .docxto R
first of all, I want to give thanks for this awesome forum. I found several solutions for my upcoming issues.
But this time I haven't found anything...
However, I have a complex .docx document, containing an index, formatted to .xml.
library(XML)
xmlfile <- xmlParse("C:/Users/Documents/stihl.xml", options = HUGE)
topxml <- xmlRoot(xmlfile)
topxml <- xmlSApply(topxml, function(x) xmlSApply(x, xmlValue))
xml_df <- data.frame(t(topxml), row.names = NULL, node)
And other possibilities to read an XML file.
My .docx document has an index and now I want to extract the several index content. As an .docx example
1. Introduction
This is an introduction importing XML by R.
2. UserGuide
Userguides are often helpful.
2.1 Style
The style should be always the same.
2.2 Language
I hope my Language is readable, because I'm contacting you from Germany.
As a result it would be nice to receive the content of the seperated chapters, for example stored in a vector.
result
[1]This is an introduction importing XML by R.
[2]Userguides are often helpful.
[3]The style should be always the same.
[4]I hope my Language is readable, because I'm contacting you from Germany.
Maybe there are other possibilities keeping the structure but I mentioned an XML import containing the tree structure as the easiest way.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage">
<pkg:part
pkg:name="/_rels/.rels"
pkg:contentType="application/vnd.openxmlformats-package.relationships+xml"
pkg:padding="512">
<pkg:xmlData>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship
Id="rId3"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"
Target="docProps/app.xml"/>
<Relationship
Id="rId2"
Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"
Target="docProps/core.xml"/>
<Relationship Id="rId1"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"
Target="word/document.xml"/>
</Relationships>
</pkg:xmlData>
</pkg:part>
<pkg:part
#serveral relationships
</pkg:part>
<pkg:part
pkg:name="/word/document.xml"
pkg:contentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml">
<pkg:xmlData>
<w:document mc:Ignorable="w14 w15 wp14"
xmlns:wpc:http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas
xmlns:mc:http://schemas.openxmlformats.org/markup-compatibility/2006
xmlns:o:urn:schemas-microsoft-com:office:office
xmlns:r:http://schemas.openxmlformats.org/officeDocument/2006/relationships
xmlns:m:http://schemas.openxmlformats.org/officeDocument/2006/math
xmlns:v:urn:schemas-microsoft-com:vml
xmlns:wp14:http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing
xmlns:wp:http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing
xmlns:w10:urn:schemas-microsoft-com:office:word
xmlns:w:http://schemas.openxmlformats.org/wordprocessingml/2006/main
xmlns:w14:http://schemas.microsoft.com/office/word/2010/wordml
xmlns:w15:http://schemas.microsoft.com/office/word/2012/wordml
xmlns:wpg:http://schemas.microsoft.com/office/word/2010/wordprocessingGroup
xmlns:wpi:http://schemas.microsoft.com/office/word/2010/wordprocessingInk
xmlns:wne:http://schemas.microsoft.com/office/word/2006/wordml
xmlns:wps:http://schemas.microsoft.com/office/word/2010/wordprocessingShape
<w:body>
<w:p> ...
</w:p>
<w:p w14:paraId="5BB64FEF" w14:textId="77777777" w:rsidR="005A3789" w:rsidRDefault="005A3789" w:rsidP="005A3789">
<w:pPr>
<w:pStyle w:val="Inhaltsverzeichnisberschrift"/>
</w:pPr>
<w:r>
<w:lastRenderedPageBreak/>
<w:t>Inhaltsverzeichnis</w:t>
</w:r>
</w:p>
'Inhaltsverzeichnis' is the titel of my index. The path is
package -> 3.part -> xmldata -> document -> body -> p
The information is stored here for example
<w:p w14:paraId="15ECF978" w14:textId="77777777" w:rsidR="009B5500" w:rsidRDefault="005A3789">
<w:pPr>
<w:pStyle w:val="Verzeichnis1"/>
<w:rPr>
<w:rFonts w:eastAsiaTheme="minorEastAsia"/>
<w:b w:val="0"/>
<w:noProof/>
<w:color w:val="auto"/>
<w:lang w:eastAsia="de-DE"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:b w:val="0"/>
</w:rPr>
<w:fldChar w:fldCharType="begin"/>
</w:r>
<w:r>
<w:instrText xml:space="preserve"> TOC \o "1-4" \h \z \u
</w:instrText>
</w:r>
<w:r>
<w:rPr>
<w:b w:val="0"/>
</w:rPr>
<w:fldChar w:fldCharType="separate"/>
</w:r>
<w:hyperlink w:anchor="_Toc474825312" w:history="1">
<w:r w:rsidR="009B5500" w:rsidRPr="009D0220"><w:rPr>
<w:rStyle w:val="Hyperlink"/>
<w:noProof/>
</w:rPr>
**<w:t>1</w:t>**
</w:r>
<w:r w:rsidR="009B5500"><w:rPr><w:rFonts w:eastAsiaTheme="minorEastAsia"/>
<w:b w:val="0"/>
<w:noProof/>
<w:color w:val="auto"/>
<w:lang w:eastAsia="de-DE"/>
</w:rPr><w:tab/>
</w:r>
<w:r w:rsidR="009B5500" w:rsidRPr="009D0220">
<w:rPr>
<w:rStyle w:val="Hyperlink"/>
<w:noProof/>
</w:rPr>
**<w:t>Management Summary</w:t>**
</w:r>
<w:r w:rsidR="009B5500">
<w:rPr>
<w:noProof/>
<w:webHidden/>
</w:rPr>
<w:tab/>
</w:r>
<w:r w:rsidR="009B5500">
<w:rPr>
<w:noProof/>
<w:webHidden/>
</w:rPr><w:fldChar w:fldCharType="begin"/>
</w:r>
<w:r w:rsidR="009B5500">
<w:rPr>
<w:noProof/>
<w:webHidden/>
</w:rPr>
<w:instrText xml:space="preserve"> PAGEREF _Toc474825312 \h </w:instrText>
</w:r>
<w:r w:rsidR="009B5500">
<w:rPr>
<w:noProof/>
<w:webHidden/>
</w:rPr>
</w:r>
<w:r w:rsidR="009B5500">
<w:rPr>
<w:noProof/>
<w:webHidden/>
</w:rPr>
<w:fldChar w:fldCharType="separate"/>
</w:r>
<w:r w:rsidR="009B5500">
<w:rPr>
<w:noProof/>
<w:webHidden/>
</w:rPr>
**<w:t>6</w:t>**
</w:r>
<w:r w:rsidR="009B5500">
<w:rPr>
<w:noProof/>
<w:webHidden/>
</w:rPr>
<w:fldChar w:fldCharType="end"/>
</w:r>
</w:hyperlink>
</w:p>
This is the first entry of the index, 1. Management Summary 6
We can use:
library(xml2)
library(magrittr)
x <- read_xml("path/to/file.xml")
titles <- xml_find_all(x,
"/pkg:package//pkg:part/pkg:xmlData/w:document/w:body/w:p/w:hyperlink/w:r/w:t") %>%
xml_text() %>%
matrix(ncol = 3, byrow = T) %>%
as.data.frame()
colnames(titles)<- c('numChapter', 'title', 'numPage')
This retrives the text inside all the nodes corresponding to that xpath.
Based on your given example that xpath contains (what I suppose are) the numChapter, its title and its numPage.
As noted this will give an error if the xml is not well formed and/or some namespaces are missing.
Hope this helps
Related
I have a Word document where I need to replace certain placeholder variables with actual data using .NET Core.
This is the test document that I'm working with. As you can see it currently has two placeholder variables.
The code I have to read a Word document and replace text comes from MSDN using WordprocessingDocument.
await using var stream = new MemoryStream();
stream.Write(template.Blob, 0, template.Blob.Length);
using (var wordDoc = WordprocessingDocument.Open(stream, true))
{
if (wordDoc.MainDocumentPart == null)
{
return null;
}
string docText;
using (var sr = new StreamReader(wordDoc.MainDocumentPart.GetStream()))
{
docText = await sr.ReadToEndAsync();
}
// Test replacing a variable
Regex regexText = new Regex("{{Building_Current_Version}}");
docText = regexText.Replace(docText, "Some Value");
await using (var sw = new StreamWriter(wordDoc.MainDocumentPart.GetStream(FileMode.Create)))
{
await sw.WriteAsync(docText);
}
}
But this doesn't work because the docText output is formatted like this:
<w:r w:rsidR="00287CAD">
<w:rPr>
<w:lang w:val="en-US"/>
</w:rPr>
<w:br/>
<w:t>{{</w:t>
</w:r>
<w:proofErr w:type="spellStart"/>
<w:r w:rsidR="00287CAD">
<w:rPr>
<w:lang w:val="en-US"/>
</w:rPr>
<w:t>Building_Current_Version</w:t>
</w:r>
<w:proofErr w:type="spellEnd"/>
<w:r w:rsidR="00287CAD">
<w:rPr>
<w:lang w:val="en-US"/>
</w:rPr>
<w:t>}}</w:t>
</w:r>
<w:r w:rsidR="00287CAD">
<w:rPr>
<w:lang w:val="en-US"/>
</w:rPr>
<w:br/>
<w:t>{{</w:t>
</w:r>
<w:proofErr w:type="spellStart"/>
<w:r w:rsidR="00287CAD">
<w:rPr>
<w:lang w:val="en-US"/>
</w:rPr>
<w:t>Building_Current_ValidUntil</w:t>
</w:r>
<w:proofErr w:type="spellEnd"/>
<w:r w:rsidR="00287CAD">
<w:rPr>
<w:lang w:val="en-US"/>
</w:rPr>
<w:t>}}</w:t>
</w:r>
For some reason the brackets are placed in separate XML tags. But sometimes it doesn't do this. Sometimes it also breaks a variable up in separate XML tags. I'm not adding any formatting to the texts.
So it seems like a simple string replace doesn't work here... Unless there is a way to tell Word not to break up the variables in separate XML tags?
How can I solve this issue?
A few days back I was having an issue with the records from the sabre for alternate days, now finally I got the records but the records are much less, like when I search roundtrip for AD3 for 7 days duration the only 49 itineraries and for oneway AD1 9 records from the sabre. is there something wrong with the XML request.
below is the XML request
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header><m:MessageHeader xmlns:m="http://www.ebxml.org/namespaces/messageHeader">
<m:From>
<m:PartyId type="urn:x12.org:IO5:01">http://deluxholidaysnew.local</m:PartyId>
</m:From>
<m:To>
<m:PartyId type="urn:x12.org:IO5:01">https://sws-crt.cert.havail.sabre.com</m:PartyId>
</m:To>
<m:CPAId>****</m:CPAId>
<m:ConversationId>V1#dXIIccWqTWCaYP1Nil099DvScws2Fuy2ufg1d2Zb#5b8aa3bcbfe2c#http://test.local</m:ConversationId>
<m:Service m:type="OTA">BargainFinderMax_ADRQ</m:Service>
<m:Action>BargainFinderMax_ADRQ</m:Action>
<m:MessageData>
<m:MessageId>968799525452240610</m:MessageId>
<m:Timestamp>2018-09-01T15:35:42Z</m:Timestamp>
<m:TimeToLive>2018-09-01T16:35:42Z</m:TimeToLive>
</m:MessageData>
<m:DuplicateElimination/>
<m:Description>BargainFinderMax_ADRQ</m:Description>
</m:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/ACPCRTC!ICESMSLB\/CRT.LB!1535812545543!1815120!65537</wsse:BinarySecurityToken>
</wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body><OTA_AirLowFareSearchRQ xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Target="Production" Version="4.2.0" ResponseType="OTA" ResponseVersion="4.2.0">
<POS>
<Source PseudoCityCode="****">
<RequestorID ID="1" Type="1">
<CompanyName Code="TN" />
</RequestorID>
</Source>
</POS>
<OriginDestinationInformation RPH="1">
<DepartureDateTime>2018-09-08T00:00:00</DepartureDateTime>
<OriginLocation LocationCode="DXB" />
<DestinationLocation LocationCode="KHI" />
<TPA_Extensions>
<DateFlexibility NbrOfDays="3"/>
<SegmentType Code="O" />
</TPA_Extensions>
</OriginDestinationInformation>
<OriginDestinationInformation RPH="2">
<DepartureDateTime>2018-09-15T00:00:00</DepartureDateTime>
<OriginLocation LocationCode="KHI" />
<DestinationLocation LocationCode="DXB" />
<TPA_Extensions>
<DateFlexibility NbrOfDays="3"/>
<SegmentType Code="O" />
</TPA_Extensions>
</OriginDestinationInformation>
<TravelPreferences ValidInterlineTicket="true" >
<CabinPref PreferLevel="Preferred" Cabin="Y" />
<TPA_Extensions>
<TripType Value="Return" />
<LongConnectTime Min="780" Max="1200" Enable="true"/>
<ExcludeCallDirectCarriers Enabled="true"/>
</TPA_Extensions>
</TravelPreferences>
<TravelerInfoSummary>
<SeatsRequested>1</SeatsRequested>
<AirTravelerAvail>
<PassengerTypeQuantity Code="ADT" Quantity="1" />
</AirTravelerAvail>
<PriceRequestInformation CurrencyCode="PKR" >
<TPA_Extensions>
</TPA_Extensions>
</PriceRequestInformation>
</TravelerInfoSummary>
<TPA_Extensions>
<IntelliSellTransaction>
<RequestType Name="AD3"/>
</IntelliSellTransaction>
</TPA_Extensions>
</OTA_AirLowFareSearchRQ></SOAP-ENV:Body></SOAP-ENV:Envelope>
Following the design of BargainFinderMax_ADRQ in RequestType you only can include the following options:
<!-- Name="AD1" will return itineraries for up to 9 alternate date combinations (+/-1 day for departure and return date). -->
<!-- Name="AD3" will return itineraries for up to 49 alternate date combinations (up to +/-3 days for departure and return date). -->
When you include AD1 it will return 9 options based on a 3x3 matrix which includes the 3 options for the outbound leg and the 3 options for the inbound leg in all varying combinations. Alternate Dates is to provide a hint that there are alternatives if you choose different date of travel you may get a lower fare.
Following the same criteria if you have and AD3 round trip request we will have 7 options for the outbound (3 options for the 3 days before + 1 option for the original date + 3 options for the days after) and 7 options for the inbound. That will make for a total of 49 options based on a 7x7 matrix.
Unfortunately this is one of the limitation of the BFM Alternate Date logic as it only produces a matrix depending on the day requested (3x3 in AD1 and 7x7 in AD3).
I'm making the following sequence of calls to reserve a hotel room using the direct sell request:
HotelPropertyDescriptionRQ
PassengerDetailsRQ
OTA_HotelResRQ
The final response errors with:
FORMAT ERROR ON OPTIONAL FIELD
I'm unable to work out what is causing this error - is it perhaps the RPH of the room is not being correctly added to the PassengerDetailsRQ?
The OTA_HotelResRQ is:
<OTA_HotelResRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ReturnHostCommand="true" TimeStamp="2017-02-13T12:45:24" Version="2.2.0">
<Hotel>
<BasicPropertyInfo RPH="001">
<ConfirmationNumber>PWBA-POW-131c-02</ConfirmationNumber>
</BasicPropertyInfo>
<Guarantee Type="G">
<CC_Info>
<PaymentCard Code="VI" ExpireDate="2018-10" Number="4111111111111111"/>
<PersonName>
<Surname>TEST</Surname>
</PersonName>
</CC_Info>
</Guarantee>
<RoomType NumberOfUnits="1"/>
</Hotel>
The HotelPropertyDescriptionRQ:
<HotelPropertyDescriptionRQ Version="2.3.0" xmlns="http://webservices.sabre.com/sabreXML/2011/10">
<AvailRequestSegment>
<GuestCounts Count="1" />
<HotelSearchCriteria>
<Criterion>
<HotelRef HotelCode="0007855" />
</Criterion>
</HotelSearchCriteria>
<TimeSpan End="2016-12-17" Start="2016-12-10"/>
</AvailRequestSegment>
</HotelPropertyDescriptionRQ>
The PassengerDetailsRQ:
<PassengerDetailsRQ xmlns="http://services.sabre.com/sp/pd/v3_3" version="3.3.0" IgnoreOnError="false" HaltOnError="true">
<PostProcessing IgnoreAfter="false" RedisplayReservation="true" UnmaskCreditCard="true">
<EndTransactionRQ>
<EndTransaction Ind="true"></EndTransaction>
<Source ReceivedFrom="PW TESTING"/>
</EndTransactionRQ>
</PostProcessing>
<PreProcessing IgnoreBefore="false">
<UniqueID ID=""/>
</PreProcessing>
<SpecialReqDetails>
<AddRemarkRQ>
<RemarkInfo>
<FOP_Remark>
<CC_Info Suppress="true">
<PaymentCard Code="VI" ExpireDate="2017-12" Number="4444333322221111" SuppressApprovalCode="true"/>
</CC_Info>
</FOP_Remark>
</RemarkInfo>
</AddRemarkRQ>
</SpecialReqDetails>
<TravelItineraryAddInfoRQ>
<AgencyInfo>
<Address>
<AddressLine>XXXXXXXXXXX Ltd</AddressLine>
<CityName>London</CityName>
<CountryCode>GB</CountryCode>
<PostalCode>XXXX XXX</PostalCode>
<StateCountyProv StateCode="LN" />
<StreetNmbr>2 Some Rome</StreetNmbr>
</Address>
</AgencyInfo>
<CustomerInfo>
<ContactNumbers>
<ContactNumber NameNumber="1.1" Phone="817-555-1212" PhoneUseType="H" />
</ContactNumbers>
<PersonName Infant="false" NameNumber="1.1">
<GivenName>Iain</GivenName>
<Surname>TESTING</Surname>
</PersonName>
</CustomerInfo>
</TravelItineraryAddInfoRQ>
</PassengerDetailsRQ>
I believe it is because you are adding a confirmation number to the sell request, which is an optional field when selling passive segments, but it should not be expected when actually requesting the room to the hotel.
<ConfirmationNumber>PWBA-POW-131c-02</ConfirmationNumber>
I would try removing that.
To reserve a hotel room using the direct sell request from sabre used OTA_HotelResRQ request.
Here is one example for request (i already used this request and get response from sabre)
<?xml version="1.0"?>
-<OTA_HotelResRQ Version="2.2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-<Hotel xmlns="http://webservices.sabre.com/sabreXML/2011/10">
<BasicPropertyInfo RPH="001"/>
<Customer NameNumber="01.01"/>
-<Guarantee Type="G">
-<CC_Info>
<PaymentCard Number="3782 8224 6310 005" ExpireDate="2021-09" Code="AX"/>
-<PersonName>
<Surname>tailor</Surname>
</PersonName>
</CC_Info>
</Guarantee>
<RoomType NumberOfUnits="1"/>
</Hotel>
</OTA_HotelResRQ>
I send 3 adults and 2 childs in search request(action: BargainFinderMax_RQ ) and in response(action: BargainFinderMax_RS) we receive 5 adults.
Sabre returns as info :
CNN NOT APPLICABLE - ADT FARE USED - VERIFY RESTRICTIONS
I would like to ask if there is any parameter supplied that Sabre provides that will let me receive only given passenger type.
Edit: Here is the BargainFinderMaxRQ:
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<OTA_AirLowFareSearchRQ PrimaryLangID="En" Version="1.8.5" ResponseType="OTA" ResponseVersion="1.8.5" xmlns="http://www.opentravel.org/OTA/2003/05">
<OriginDestinationInformation RPH="1">
<DepartureDateTime>2016-08-26T12:00:00</DepartureDateTime>
<DepartureWindow>00002359</DepartureWindow>
<OriginLocation LocationCode="KRR" />
<DestinationLocation LocationCode="DLM" />
</OriginDestinationInformation>
<OriginDestinationInformation RPH="2">
<DepartureDateTime>2016-09-02T12:00:00</DepartureDateTime>
<DepartureWindow>00002359</DepartureWindow>
<OriginLocation LocationCode="DLM" />
<DestinationLocation LocationCode="KRR" />
</OriginDestinationInformation>
<TravelPreferences>
<TPA_Extensions>
<DiversityParameters AdditionalNonStopsNumber="10" />
</TPA_Extensions>
</TravelPreferences>
<TravelerInfoSummary>
<SeatsRequested>5</SeatsRequested>
<AirTravelerAvail>
<PassengerTypeQuantity Code="ADT" Quantity="3" />
<PassengerTypeQuantity Age="8" Code="CNN" Quantity="2" />
</AirTravelerAvail>
</TravelerInfoSummary>
</OTA_AirLowFareSearchRQ>
</s:Body>
You need to use the XOFares element:
<!--"Value" (required) Indicator for whether to return only fares with a passenger type the same as the passenger type specified in the request.-->
<!--Value="true" Returns only fares with a passenger type the same as the passenger type specified in the request.-->
<!--Value="false" (default) Uses standard Bargain Finder Max logic.-->
<XOFares Value="true"/>
Single item of array:
array(3) {
'name' =>
string(19) "trigger_assignments"
'description' =>
string(67) "Maps trigger to hook and operation assignments from trigger.module."
'fields' =>
array(3) {
[0] =>
array(3) {
'name' =>
string(4) "hook"
'description' =>
string(76) "Primary Key: The name of the internal Drupal hook; for example, node_insert."
'type' =>
string(7) "varchar"
}
[1] =>
array(3) {
'name' =>
string(3) "aid"
'description' =>
string(36) "Primary Key: Action's {actions}.aid."
'type' =>
string(7) "varchar"
}
[2] =>
array(3) {
'name' =>
string(6) "weight"
'description' =>
string(67) "The weight of the trigger assignment in relation to other triggers."
'type' =>
string(3) "int"
}
}
}
I can't display 'fields' array. It should be display in table, my code:
[c;block=begin; sub1=(fields)]
Nazwa tabeli: [c.name;]
[c.description;]
Lista pól tabeli:
Nazwa Typ Opis
[c_sub1.name;block=tr] [c_sub1.type;] [c_sub1.description;]
[c;block=end]
The sample result is:
Nazwa tabeli: aggregator_category
Stores categories for aggregator feeds and feed items.
Lista pól tabeli:
Nazwa Typ Opis
[c_sub1.name;block=tr] [c_sub1.type;] [c_sub1.description;]
So table with fields was not displayed.
Could someone give me any advixe?
Code:
$TBS->MergeBlock('c', $table);
$table has items like above inside.
XML:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 wp14" xml:space="preserve">
<w:body>
<w:p w:rsidRDefault="00905443" w:rsidP="00273597">
<w:r>
<w:t>
</w:t>
</w:r>
</w:p>
<w:p w:rsidRDefault="00595A19" w:rsidP="00273597">
<w:r>
<w:t>
Nazwa tabeli: aggregator_category
</w:t>
</w:r>
</w:p>
<w:p w:rsidRDefault="008248E2" w:rsidP="00273597">
<w:r>
<w:t>
Stores categories for aggregator feeds and feed items.
</w:t>
</w:r>
</w:p>
<w:p w:rsidRDefault="00462CAC" w:rsidP="00273597">
<w:r>
<w:t>
Lista pól tabeli:
</w:t>
</w:r>
</w:p>
<w:p w:rsidRDefault="00F53554" w:rsidP="00F53554">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:lineRule="auto"/>
<w:rPr>
<w:rFonts w:ascii="Times New Roman" w:eastAsia="Times New Roman" w:hAnsi="Times New Roman"/>
<w:sz w:val="24"/>
<w:szCs w:val="24"/>
</w:rPr>
</w:pPr>
</w:p>
<w:tbl>
<w:tblPr>
<w:tblpPr w:leftFromText="141" w:rightFromText="141" w:vertAnchor="text" w:horzAnchor="margin" w:tblpXSpec="center" w:tblpY="425"/>
<w:tblW w:w="9606" w:type="dxa"/>
<w:tblBorders>
<w:top w:val="single" w:sz="4" w:space="0" w:color="auto"/>
<w:left w:val="single" w:sz="4" w:space="0" w:color="auto"/>
<w:bottom w:val="single" w:sz="4" w:space="0" w:color="auto"/>
<w:right w:val="single" w:sz="4" w:space="0" w:color="auto"/>
<w:insideH w:val="single" w:sz="4" w:space="0" w:color="auto"/>
<w:insideV w:val="single" w:sz="4" w:space="0" w:color="auto"/>
</w:tblBorders>
<w:tblLook w:val="01E0" w:firstRow="1" w:lastRow="1" w:firstColumn="1" w:lastColumn="1" w:noHBand="0" w:noVBand="0"/>
</w:tblPr>
<w:tblGrid>
<w:gridCol w:w="2440"/>
<w:gridCol w:w="1567"/>
<w:gridCol w:w="5599"/>
</w:tblGrid>
<w:tr w:rsidTr="005C7EBF">
<w:trPr>
<w:trHeight w:hRule="exact" w:val="340"/>
<w:tblHeader/>
</w:trPr>
<w:tc>
<w:tcPr>
<w:tcW w:w="2440" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="C0C0C0"/>
<w:vAlign w:val="center"/>
</w:tcPr>
<w:p w:rsidRDefault="00CE4402" w:rsidP="005E0ABE">
<w:pPr>
<w:spacing w:line="240" w:lineRule="auto"/>
<w:jc w:val="center"/>
<w:rPr>
<w:b/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:b/>
</w:rPr>
<w:t>
Nazwa
</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="1567" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="C0C0C0"/>
</w:tcPr>
<w:p w:rsidRDefault="00CE4402" w:rsidP="005E0ABE">
<w:pPr>
<w:spacing w:line="240" w:lineRule="auto"/>
<w:jc w:val="center"/>
<w:rPr>
<w:b/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:b/>
</w:rPr>
<w:t>
Typ
</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="5599" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="C0C0C0"/>
<w:vAlign w:val="center"/>
</w:tcPr>
<w:p w:rsidRDefault="00CE4402" w:rsidP="005E0ABE">
<w:pPr>
<w:spacing w:line="240" w:lineRule="auto"/>
<w:jc w:val="center"/>
<w:rPr>
<w:b/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:b/>
</w:rPr>
<w:t>
Opis
</w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>
<w:tr w:rsidTr="005C7EBF">
<w:trPr>
<w:trHeight w:hRule="exact" w:val="521"/>
</w:trPr>
<w:tc>
<w:tcPr>
<w:tcW w:w="2440" w:type="dxa"/>
</w:tcPr>
<w:p w:rsidRDefault="005C7EBF" w:rsidP="005C7EBF">
<w:pPr>
<w:spacing w:line="240" w:lineRule="auto"/>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="Verdana" w:eastAsia="Times New Roman" w:hAnsi="Verdana"/>
<w:color w:val="000000"/>
<w:sz w:val="18"/>
<w:szCs w:val="18"/>
</w:rPr>
<w:t>
[c_sub1.name;block=tr]
</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="1567" w:type="dxa"/>
</w:tcPr>
<w:p w:rsidRDefault="005C7EBF" w:rsidP="005C7EBF">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:lineRule="auto"/>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="Verdana" w:eastAsia="Times New Roman" w:hAnsi="Verdana"/>
<w:color w:val="000000"/>
<w:sz w:val="18"/>
<w:szCs w:val="18"/>
</w:rPr>
<w:t>
[c_sub1.type;]
</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="5599" w:type="dxa"/>
</w:tcPr>
<w:p w:rsidRDefault="005C7EBF" w:rsidP="005C7EBF">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:lineRule="auto"/>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="Verdana" w:eastAsia="Times New Roman" w:hAnsi="Verdana"/>
<w:color w:val="000000"/>
<w:sz w:val="18"/>
<w:szCs w:val="18"/>
</w:rPr>
<w:t>
[c_sub1.description;]
</w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>
</w:tbl>
<w:p w:rsidRDefault="00A927EE" w:rsidP="00273597">
<w:pPr>
<w:rPr>
<w:rStyle w:val="Strong"/>
<w:rFonts w:ascii="Verdana" w:hAnsi="Verdana"/>
<w:color w:val="006600"/>
<w:sz w:val="18"/>
<w:szCs w:val="18"/>
<w:shd w:val="clear" w:color="auto" w:fill="FFFFFF"/>
</w:rPr>
</w:pPr>
</w:p>
<w:p w:rsidRDefault="00905443" w:rsidP="00273597">
<w:r>
<w:rPr>
<w:rFonts w:ascii="Verdana" w:hAnsi="Verdana"/>
<w:color w:val="000000"/>
<w:sz w:val="18"/>
<w:szCs w:val="18"/>
<w:shd w:val="clear" w:color="auto" w:fill="FFFFFF"/>
</w:rPr>
<w:t>
</w:t>
</w:r>
</w:p>
<w:sectPr>
<w:pgSz w:w="11906" w:h="16838"/>
<w:pgMar w:top="1417" w:right="1417" w:bottom="1417" w:left="1417" w:header="708" w:footer="708" w:gutter="0"/>
<w:cols w:space="708"/>
<w:docGrid w:linePitch="360"/>
</w:sectPr>
</w:body>
</w:document>
I cannot replicate your result with the information you've given. Using these two test files your data printed like so:
<div>
Name: trigger_assignments<Br>
Maps trigger to hook and operation assignments from trigger.module.
<Br >List:
<table>
<tr>
<td>Nazwa</td>
<td>Typ</td>
<td>Opis</td>
</tr>
<tr>
<td>hook</td>
<td>varchar</td>
<td>Primary Key: The name of the internal Drupal hook; for example, node_insert.</td>
</tr><tr>
<td>aid</td>
<td>varchar</td>
<td>Primary Key: Action's {actions}.aid.</td>
</tr><tr>
<td>weight</td>
<td>int</td>
<td>The weight of the trigger assignment in relation to other triggers.</td>
</tr>
</table>
<br /><br />
</div>
test.php:
$test = array(
array ('name' => "trigger_assignments",
'description' => "Maps trigger to hook and operation assignments from trigger.module.",
'fields' => array(
array('name' => "hook",
'description' => "Primary Key: The name of the internal Drupal hook; for example, node_insert.",
'type' => "varchar"),
array('name' => "aid",
'description' => "Primary Key: Action's {actions}.aid.",
'type' => "varchar"),
array('name' => "weight",
'description' => "The weight of the trigger assignment in relation to other triggers.",
'type' => "int")
)
)
);
include_once('includes/tbs_class.php');
$TBS = new clsTinyButStrong;
$TBS->LoadTemplate('test.html');
$TBS->MergeBlock('test', $test);
$TBS->Show();
And test.html:
<div>
[test;block=begin; sub1=(fields)]
Name: [test.name;]<Br>
[test.description;]
<Br >List:
<table>
<tr>
<td>Nazwa</td>
<td>Typ</td>
<td>Opis</td>
</tr>
<tr>
<td>[test_sub1.name;block=tr]</td>
<td>[test_sub1.type;]</td>
<td>[test_sub1.description;]</td>
</tr>
</table>
<br /><br />
[test;block=end]
</div>
Don't know if that helps. Maybe you could give a little more info about your variable 'c' and your $TBS->mergeBlock() command?